write a program to swap Two numbers without using temp variable.
Answer Posted / saurav raj
#include<stdio.h>
#include<conio.h>
void main()
int a,b;
clrscr();
printf("Enter Two number a & b:- ");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("\nA=%d \t B=%d",a,b);
getch();
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why we use break in c?
Explain how does free() know explain how much memory to release?
What are the data types present in c?
Explain how do you generate random numbers in c?
What is scope rule of function in c?
What does do in c?
How can I read/write structures from/to data files?
What is the right way to use errno?
What are the advantages and disadvantages of c language?
What is a structural principle?
Why is struct padding needed?
What does the && operator do in a program code?
What are categories used for in c?
Is it possible to pass an entire structure to functions?
What functions are used in dynamic memory allocation in c?