write a program to swap Two numbers without using temp variable.
Answer Posted / ravi saini
void main()
{
int a,b;
printf("enter the two numbers");
scanf("%d%d",&a,&b);
a^=b^=a^=b;
printf("%d%d",a,b);//swapped no
}
| Is This Answer Correct ? | 119 Yes | 66 No |
Post New Answer View All Answers
Is javascript written in c?
In which layer of the network datastructure format change is done
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
Can you subtract pointers from each other? Why would you?
If errno contains a nonzero number, is there an error?
Explain logical errors? Compare with syntax errors.
Describe explain how arrays can be passed to a user defined function
Is there a way to jump out of a function or functions?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
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......
What is the difference between arrays and pointers?
What are lookup tables in c?
What are the key features in c programming language?
What is a pointer value and address in c?