write a program to swap Two numbers without using temp variable.
Answer Posted / amar
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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
Why does everyone say not to use scanf? What should I use instead?
can anyone please tell about the nested interrupts?
What is pointers in c with example?
How can you find the day of the week given the date?
Difference between Shallow copy and Deep copy?
What are the disadvantages of c language?
Explain what is the best way to comment out a section of code that contains comments?
Describe the modifier in c?
List the variables are used for writing doubly linked list program.
Explain what are the different file extensions involved when programming in c?
The difference between printf and fprintf is ?
Explain about C function prototype?
What is the use of a static variable in c?
What is 1d array in c?