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 is a vector c++?

0 Answers  


What is the difference between equal to (==) and assignment operator (=)?

0 Answers  


the first character in the variable name must be an a) special symbol b) number c) alphabet

0 Answers  


Why is "using namespace std;" considered bad practice?

0 Answers  


write a program that takes two numbers from user that prints the smallest number

2 Answers  






When does a 'this' pointer get created?

0 Answers  


Differentiate between declaration and definition in C++?

1 Answers  


What is implicit pointer in c++?

0 Answers  


When should overload new operator on a global basis or a class basis?

0 Answers  


What is size of Empty Class?

3 Answers   Persistent,


make a middle node of doubly linklist to the top of the list

1 Answers  


What is c++ redistributable?

0 Answers  


Categories