write a program to add two numbers without using an arithmetic
operator.



write a program to add two numbers without using an arithmetic operator...

Answer / mogankumar pc

#include<stdio.h>
#include<conio.h>
int main()
{
int first,second;
printf("enter the two numbers");
scanf("%d%d",&first,&second);
first+= second;
printf("RESULT:%d",first);
getch();
return 0;
}
//+= is not arithmetic operator; its assignment operator

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More C++ General Interview Questions

Is arr and &arr are same expression for an array?

0 Answers  


Tell me an example where stacks are useful?

0 Answers  


What is the size of integer variable?

0 Answers  


What are templates? where we should use it?

2 Answers   Alcatel,


What is the full form nasa?

0 Answers  






What is buffer and example?

0 Answers  


What is & in c++ function?

0 Answers  


When one must use recursion function? Mention what happens when recursion functions are declared inline?

0 Answers  


What methods can be overridden in java?

0 Answers  


What is pointer to member?

0 Answers  


What is the difference between reference type and pointers.

4 Answers   HCL,


Why should we use null or zero in a program?

0 Answers  


Categories