write a program to swap Two numbers without using temp variable.
Answer Posted / dally
#include<stdio.h>
int main()
{
int a,b;
printf("Enter values for a,b\n");
scanf("%d %d",&a,&b);
b = b+a;
a= b-a;
b=b-a;
printf("a = %d,b = %d",a,b);
}
| Is This Answer Correct ? | 18 Yes | 11 No |
Post New Answer View All Answers
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
Write the control statements in C language
What is difference between structure and union?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
Do variables need to be initialized?
what is the structure pointer?
Implement bit Array in C.
why do some people write if(0 == x) instead of if(x == 0)?
Is a house a mass structure?
Explain the Difference between the New and Malloc keyword.
When should the register modifier be used? Does it really help?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
Why can’t constant values be used to define an array’s initial size?
What is bss in c?
What is the condition that is applied with ?: Operator?