write a program to swap Two numbers without using temp variable.
Answer Posted / kabita shah
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int x,y;
printf("enter two value");
scanf("%d%d",&x,&y);
x=x+y;
y=x-y;
x=x-y;
printf("value of x=%d",x);
printf("value of y=%d",y);
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is operator promotion?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is the difference between the local variable and global variable in c?
what do u mean by Direct access files? then can u explain about Direct Access Files?
Write a program to generate random numbers in c?
How can I direct output to the printer?
What are the advantages of c preprocessor?
Explain threaded binary trees?
Which driver is a pure java driver
Describe newline escape sequence with a sample program?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
Is main is user defined function?
How can I find out how much free space is available on disk?
What is scanf () in c?
What do you mean by recursion in c?