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? Explain what are bus errors, memory faults, and core dumps?
how to count no of words,characters,lines in a paragraph.
What is a dynamic array in c?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
How can a string be converted to a number?
What are the disadvantages of a shell structure?
Are pointers integers in c?
Is the exit() function same as the return statement? Explain.
How was c created?
What's a good way to check for "close enough" floating-point equality?
I have seen function declarations that look like this
In which layer of the network datastructure format change is done
Write a C program to count the number of email on text
Can we replace the struct function in tree syntax with a union?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none