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

Explain "const" reference arguments in function?

619


Is c++ platform dependent?

639


What is different in C++, compare with unix?

613


What is the use of main function in c++?

534


What is a class template in c++?

527






Out of fgets() and gets() which function is safe to use and why?

731


Is c++ a good beginners programming language?

586


What is this weird colon-member (" : ") syntax in the constructor?

547


Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes

593


Why is standard template library used?

590


What do you mean by volatile and mutable keywords used in c++?

587


What is ctime c++?

584


Is c++ low level?

582


Explain the advantages of using friend classes.

596


What is c++ 11 and c++ 14?

594