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
What is function declaration in c++ with example?
What are the three forms of cin.get() and what are their differences?
what do you mean by volatile variable?
Explain function overloading
What are references in c++? What is a local reference?
Why ctype h is used in c++?
What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)
Define pure virtual function?
Which of the following is evaluated first: a) && b) || c) !
What are the two types of comments, and how do they differ?
Why do we use string in c++?
What is the role of C++ shorthand's?
Can a new be used in place of old mallocq? If yes, why?
How to declare an array of pointers to integer?
Distinguish between a # include and #define.