swap two integer variables without using a third temporary
variable?
Answer Posted / onkar koparde
i'll only give u logic #include<stdio.h>
void main() { int a=10,b=20;
printf("b4 swap:a=%d b=%d",a,b);
a=a+b;b=a-b;a=a-b; printf("aftr
swap:a=%d b=%d",a,b); }
from-onkar.koparde@gmail.com
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Why is #define used?
What is the difference between the = symbol and == symbol?
Can we access the array using a pointer in c language?
What language is c written?
What does void main () mean?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
What are void pointers in c?
Why is extern used in c?
Explain what is a 'locale'?
What is 2c dna?
Explain what is meant by 'bit masking'?
What does stand for?
What is d'n in c?
What is a volatile keyword in c?
What is logical error?