Write a program to interchange two variables without using
the third variable?
Answer Posted / jisha. k.a
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter two no");
scanf("%d%d",&a,&b);
a=a-b;
b=a+b;
a=b-a;
printf("After chanching no is =\n");
printf("a=%d b=%d",a,b);
getch();
}
| Is This Answer Correct ? | 34 Yes | 16 No |
Post New Answer View All Answers
What is console in c language?
What is multidimensional arrays
What does int main () mean?
Tell us the use of fflush() function in c language?
What is sizeof array in c?
Explain what are compound statements?
What are the benefits of c language?
What is break in c?
What type of function is main ()?
What are run-time errors?
Can a program have two main functions?
How the c program is executed?
What is the difference between malloc() and calloc()?
When is the “void” keyword used in a function?
What library is sizeof in c?