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


Please Help Members By Posting Answers For Below Questions

Why is #define used?

783


What is the difference between the = symbol and == symbol?

615


Can we access the array using a pointer in c language?

551


What language is c written?

568


What does void main () mean?

715






Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

650


What are void pointers in c?

566


Why is extern used in c?

602


Explain what is a 'locale'?

574


What is 2c dna?

594


Explain what is meant by 'bit masking'?

635


What does stand for?

582


What is d'n in c?

622


What is a volatile keyword in c?

629


What is logical error?

594