swapping of two numbers without using third variable using
AND and OR operators
Answer Posted / ramesh reddy
a = a^b; b =a^b; a =a^b;
or
a=a+b; b=a-b; a=a-b;
| Is This Answer Correct ? | 43 Yes | 2 No |
Post New Answer View All Answers
Write the syntax and purpose of a switch statement in C.
what type of questions arrive in interview over c programming?
What is typedef?
how to find anagram without using string functions using only loops in c programming
The file stdio.h, what does it contain?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
Who is the founder of c language?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
Why is not a pointer null after calling free?
What is c definition?
What is the deal on sprintf_s return value?
What is a lookup table in c?
What is array in c with example?
What is the benefit of using const for declaring constants?
What is #line?