Write a program to interchange two variables without using
the third variable?
Answer Posted / deepa.n
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter two no");
scanf("%d%d",&a,&b);
c=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 ? | 15 Yes | 26 No |
Post New Answer View All Answers
How do you construct an increment statement or decrement statement in C?
What are multidimensional arrays?
What is a loop?
What are the different types of linkage exist in c?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
How can I make it pause before closing the program output window?
What is int main () in c?
Can a pointer be static?
What is 1d array in c?
What does a pointer variable always consist of?
What are the types of data types and explain?
What are the data types present in c?
What is use of pointer?
What is a struct c#?
Explain how do you override a defined macro?