swap two integer variables without using a third temporary
variable?
Answer Posted / onkar koparde
i'll only give u logic #include<stdio.h>
void main() { int a=10,b=20;
printf("b4 swap:a=%d b=%d",a,b);
a=a+b;b=a-b;a=a-b; printf("aftr
swap:a=%d b=%d",a,b); }
from-onkar.koparde@gmail.com
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
How do you write a program which produces its own source code as output?
If I have a char * variable pointing to the name of a function ..
How many types of operators are there in c?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
Is c is a high level language?
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 strcpy() function?
What are the 5 organizational structures?
How do we make a global variable accessible across files? Explain the extern keyword?
How can you be sure that a program follows the ANSI C standard?
What's the total generic pointer type?
What are qualifiers and modifiers c?
Is there any demerits of using pointer?
What is the 'named constructor idiom'?
How variables are declared in c?