Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


c program to subtract between two numbers without using '-'
sign and subtract function.

Answers were Sorted based on User's Feedback



c program to subtract between two numbers without using '-' sign and subtract function...

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

c program to subtract between two numbers without using '-' sign and subtract function...

Answer / 080132

Do anybody give correct ans

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Interview Questions

Explain what is the difference between the expression '++a' and 'a++'?

0 Answers  


How are structure passing and returning implemented?

0 Answers  


a program that can input number of records and can view it again the record

0 Answers   Accenture,


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.

1 Answers  


will u give me old quesrion papers for aptitude for L & t info tech?

1 Answers   Hindustan, L&T,


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

2 Answers   TCS,


provide an example of the Group by clause, when would you use this clause

0 Answers  


#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?

2 Answers  


Explain high-order and low-order bytes.

0 Answers  


WHAT IS FLOAT?

3 Answers  


What is c language used for?

0 Answers  


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

0 Answers  


Categories