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 c language used for?
What are the disadvantages of external storage class?
What is variable and explain rules to declare variable in c?
Is c is a middle level language?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
Why is sprintf unsafe?
int far *near * p; means
What is calloc in c?
which type of aspect you want from the student.
Give me the code of in-order recursive and non-recursive.
What’s the special use of UNIONS?
What are the features of c language?
What is the difference between int main and void main?
What is the difference between formatted&unformatted i/o functions?
Explain pointers in c programming?