a C prog to swap 2 no.s without using variables just an
array?
Answer Posted / jaspreet singh
void main()
{
int a[2]={20,10};
a[0]=a[0]^a[1];
a[1]=a[0]^a[1];
a[0]=a[0]^a[1];
printf("a=%d,b=%d",a[0],a[1])
getch();
}
Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
Which is the memory area not included in C program? give the reason
What are runtime error?
Differentiate between null and void pointers.
Is register a keyword in c?
What is the difference between new and malloc functions?
What is time complexity c?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
Is file a keyword in c?
Is the exit() function same as the return statement? Explain.
What is a macro?
Can you please explain the difference between strcpy() and memcpy() function?
What is extern storage class in c?
how can f be used for both float and double arguments in printf? Are not they different types?
Under what circumstances does a name clash occur?
What is the process to generate random numbers in c programming language?