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
Why c++ is not a pure oop language?
How can I disable the "echo" feature?
How does the copy constructor differ from the assignment operator (=)?
What is null and void pointer?
What is insertion sorting?
which of the following is not an secondary constant a) array b) real c) union
What is an inclusion guard?
Do class declarations end with a semicolon? Do class method definitions?
What are the advantages of using a pointer?
What is pointer to member?
What is the difference between a declaration and a definition?
What is the use of structure in c++?
Name the operators that cannot be overloaded in C++?
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
What is the use of main function in c++?