write a c program to add two integer numbers without using
arithmetic operator +

Answer Posted / sivaprabhu

main()
{
int a,b,c;
printf("enter the values a,b");
scanf("%d%d",&a,&b);
c=a-(~b)-1;
printf("the sum is %d",c);
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of type declarations?

683


Explain what is gets() function?

638


What is #line?

615


To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9

2195


What is n in c?

577






What is a struct c#?

603


Is there any data type in c with variable size?

636


What are the 32 keywords in c?

639


What is variable in c example?

597


What is a far pointer in c?

600


What are the features of the c language?

651


What is the best organizational structure?

644


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5061


What is meant by initialization and how we initialize a variable?

590


What are the types of c language?

561