How to swap two values using a single variable ?
condition: Not to use Array and Pointer ?
Answer Posted / jyotsna
let take a single variable 'x'
a=3
b=2
hence
x=a;
a=b;
b=x;
swapping is occured now a=2 and b=3
| Is This Answer Correct ? | 10 Yes | 12 No |
Post New Answer View All Answers
Explain setjmp()?
How #define works?
How can I swap two values without using a temporary?
What are the parts of c program?
What does static variable mean in c?
Sir i need notes for structure,functions,pointers in c language can you help me please
How macro execution is faster than function ?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
How do I read the arrow keys? What about function keys?
Explain how can I convert a number to a string?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
Explain what is the purpose of "extern" keyword in a function declaration?
What are the __date__ and __time__ preprocessor commands?
Why c is called a middle level language?