Write a program to interchange two variables without using
the third variable?
Answer Posted / vinay tiwari
void main()
{
int a,b;
printf("enter two no ");
scanf("%d%d",&a,&b);
printf("a=%d and b=%d",a,b);
a=a^b;
b=a^b;
a=a^b;
printf("a=%d and b=%d",a,b);
getch();
}
| Is This Answer Correct ? | 22 Yes | 13 No |
Post New Answer View All Answers
What is %g in c?
What does static variable mean in c?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
Explain how many levels deep can include files be nested?
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
Give basis knowledge of web designing ...
Ow can I insert or delete a line (or record) in the middle of a file?
What is FIFO?
What are dangling pointers? How are dangling pointers different from memory leaks?
Tell me is null always defined as 0(zero)?
Explain the difference between structs and unions in c?
What are categories used for in c?
Is javascript based on c?
What is difference between stdio h and conio h?
What is the size of array float a(10)?