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

What do you mean by enumerated data type?

0 Answers  


What are static variables?

0 Answers  


What is the difference between struct and class?

1 Answers  


Why do we use classes in c++?

0 Answers  


Refer to a name of class or function that is defined within a namespace?

0 Answers  


What is the best c++ book for beginners?

0 Answers  


Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z - 4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);

2 Answers  


What is std namespace in c++?

0 Answers  


What is the use of endl in c++?

0 Answers  


How does atoi function work?

0 Answers  


what is C++ exceptional handling?

0 Answers  


What is a protocol class?

1 Answers  


Categories