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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you please explain the difference between using macro and inline functions?

620


Can I learn c++ in a week?

667


What is srand c++?

674


Can a class be static in c++?

673


Explain differences between alloc() and free()?

669






What is a constant reference?

703


What is #include iostream?

852


What is using namespace std in c++?

684


What language does google use?

690


Define what is constructor?

684


What is #include sstream?

707


Explain what is class definition in c++ ?

701


What's the order in which the objects in an array are destructed?

992


Write about the various sections of the executable image?

650


what are the types of Member Functions?

717