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
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
Can stdout be forced to print somewhere other than the screen?
How can I do graphics in c?
Difference between linking and loading?
can anyone please tell about the nested interrupts?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
What are the two forms of #include directive?
Why is it important to memset a variable, immediately after allocating memory to it ?
What is the meaning of 2d in c?
Why can’t constant values be used to define an array’s initial size?
Explain data types & how many data types supported by c?
Explain what’s a signal? Explain what do I use signals for?
can we change the default calling convention in c if yes than how.........?
What is typedef struct in c?