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 are the types of pointers?
Write a program which returns the first non repetitive character in the string?
what is a function method?give example?
Explain how do you determine the length of a string value that was stored in a variable?
What is the use of a conditional inclusion statement in C?
What is difference between structure and union in c programming?
What is call by reference in functions?
What are the various types of control structures in programming?
What do you mean by dynamic memory allocation in c?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
What is page thrashing?
How do I swap bytes?
Explain what are binary trees?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
What is echo in c programming?