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;
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 ? | 8 Yes | 14 No |
Post New Answer View All Answers
What is static volatile in c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
How do you print an address?
The difference between printf and fprintf is ?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
Explain how can you be sure that a program follows the ansi c standard?
What is %d used for?
What is the difference between abs() and fabs() functions?
What is pragma in c?
What is static memory allocation? Explain
What is union and structure in c?
What are structures and unions? State differencves between them.
can we have joblib in a proc ?
Explain how can you tell whether two strings are the same?
Why is c still so popular?