write a c program to add two integer numbers without using
arithmetic operator +
Answer Posted / sushma sarma
#include<iostream.h>
int main()
{
int a,b;
cout<<"Enter a and b";
cin>>a;
cin>>b;
while(a!=0)
{
++b;
a--;
}
cout<<b;
return 0;
}
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
In which language linux is written?
Tell me the use of bit field in c language?
Why is c called a mid-level programming language?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
What is #include stdio h?
Where local variables are stored in c?
What is 1f in c?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
Is there a way to switch on strings?
What are the __date__ and __time__ preprocessor commands?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
Write a program in c to replace any vowel in a string with z?
How is a macro different from a function?
What are categories used for in c?