write a program to swap Two numbers without using temp variable.
Answer Posted / abhi
void swap(int *a,int *b)
{
if(*a == *b)
return;
*a^=*b;
*b^=*a;
*a^=*b;
}
Is This Answer Correct ? | 461 Yes | 195 No |
Post New Answer View All Answers
Explain how do you view the path?
Why should I prototype a function?
What is header file definition?
What is the use of ?: Operator?
How many types of functions are there in c?
Why header files are used?
What is c token?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
Explain what is page thrashing?
What does %p mean c?
How do you generate random numbers in C?
Explain the difference between getch() and getche() in c?
What is restrict keyword in c?
difference between native and cross compilers
What does sizeof return c?