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

Answer Posted / syamanth

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

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I remove the trailing spaces from a string?

618


How is pointer initialized in c?

589


What are the different types of data structures in c?

610


What is header file definition?

575


Explain how can I convert a string to a number?

647






What is the use of static variable in c?

597


What is a union?

613


Hi can anyone tell what is a start up code?

1618


In c language can we compile a program without main() function?

584


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

1493


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

1677


How can I discover how many arguments a function was actually called with?

637


What are formal parameters?

664


i have a written test for microland please give me test pattern

2189


What does c in a circle mean?

585