Write a program to interchange two variables without using
the third variable?
Answer Posted / guest
#include<stdio.h>
void main()
{
int x,y;
printf("enter x and y");
scanf("%d%d",&x,&y);
x=x+y;
y=x-y;
x=x-y;
printf("elements after swapping :%d,%d",x,y);
}
| Is This Answer Correct ? | 185 Yes | 32 No |
Post New Answer View All Answers
What is quick sort in c?
What is selection sort in c?
what are bit fields in c?
What is the use of getchar() function?
What oops means?
Explain how many levels deep can include files be nested?
What is malloc() function?
Why array is used in c?
What is main () in c?
How many identifiers are there in c?
Calculate 1*2*3*____*n using recursive function??
How is null defined in c?
What is string in c language?
When should we use pointers in a c program?
can anyone suggest some site name..where i can get some good data structure puzzles???