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
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What is the difference between struct and union in C?
Why do we use & in c?
What is anagram in c?
Difference between linking and loading?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
Is python a c language?
Why & is used in c?
Explain how can I avoid the abort, retry, fail messages?
In C language what is a 'dangling pointer'?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
Explain what is the benefit of using #define to declare a constant?
What is a void * in c?
What are the types of bitwise operator?
Is the exit() function same as the return statement? Explain.