two variables are added answer is stored on not for third
variable how it is possible?
Answer Posted / sujith
I am afraid i understood the question. If the question is
defined like, u need to exchange two variables without using
a temporary variable is,
a += b;
b = a - b;
a = a - b;
Another methos is ,
a ^= b ^= a ^= b;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why is not a pointer null after calling free?
List the difference between a While & Do While loops?
Why isnt there a numbered, multi-level break statement to break out
What are the three constants used in c?
How to compare array with pointer in c?
What is modeling?
What is the explanation for cyclic nature of data types in c?
What is file in c language?
When was c language developed?
Write the syntax and purpose of a switch statement in C.
How do you override a defined macro?
Is there a built-in function in C that can be used for sorting data?
What do you mean by dynamic memory allocation in c?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
Explain what is the benefit of using an enum rather than a #define constant?