write a program to swap Two numbers without using temp variable.
Answer Posted / akash
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the value a & b");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("interchange in a & b =%d%d",a,b);
getch();
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What does typedef struct mean?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
Can we declare variable anywhere in c?
code for find determinent of amatrix
What are header files? What are their uses?
What math functions are available for integers? For floating point?
How will you find a duplicate number in a array without negating the nos ?
What is define c?
Explain the array representation of a binary tree in C.
What is the purpose of the preprocessor directive error?
Differentiate between declaring a variable and defining a variable?
What is quick sort in c?
What is #define used for in c?
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.
List some basic data types in c?