c program to subtract between two numbers without using '-'
sign and subtract function.
Answers were Sorted based on User's Feedback
Answer / davic uwihoreye
Write a c program or code to subtract two numbers without
using subtraction operator
#include<stdio.h>
int main(){
int a,b;
int sum;
printf("Enter any two integers: ");
scanf("%d%d",&a,&b);
sum = a + ~b + 1;
printf("Difference of two integers: %d",sum);
return 0;
}
Sample Output:
Enter any two integers: 5 4
Difference of two integers: 1
| Is This Answer Correct ? | 9 Yes | 1 No |
Explain what is the difference between the expression '++a' and 'a++'?
How are structure passing and returning implemented?
a program that can input number of records and can view it again the record
How do i store a paragraph into a string? for example, if i input a long paragraph, the program will read the words one by one and concatenate them until no word is left.
will u give me old quesrion papers for aptitude for L & t info tech?
write a c program to find reminder and quotient if one number is divided by other.to code this program don't use more than 2 variables
provide an example of the Group by clause, when would you use this clause
#include<stdio.h> #include<conio.h> int main() { int a[4][4]={{5,7,5,9}, {4,6,3,1}, {2,9,0,6}}; int *p; int (*q)[4]; p=(int*)a; q=a; printf("\n%u%u",p,q); p++; q++; printf("\n%u%u",p,q); getch(); return 0; } what is the meaning of this program?
Explain high-order and low-order bytes.
WHAT IS FLOAT?
What is c language used for?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?