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 |
What do you mean by enumerated data type?
What are static variables?
What is the difference between struct and class?
Why do we use classes in c++?
Refer to a name of class or function that is defined within a namespace?
What is the best c++ book for beginners?
Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z - 4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);
What is std namespace in c++?
What is the use of endl in c++?
How does atoi function work?
what is C++ exceptional handling?
What is a protocol class?