write a program in C to swap two variables
Answer Posted / srinivas
#include <stdio.h>
int main(void)
{
int a = 2, b = 5;
a = a + b;
b = a - b;
a = a - b;
printf("%d\t%d\n", a, b);
return 0;
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the types of bitwise operator?
What is the use of clrscr?
what are the 10 different models of writing an addition program in C language?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
What is pointer & why it is used?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
what are the different storage classes in c?
What is the difference between the = symbol and == symbol?
Is main a keyword in c?
formula to convert 2500mmh2o into m3/hr
what are enumerations in C
Write a program to print “hello world” without using semicolon?
What are the advantages of union?
What does s c mean on snapchat?
Why is it usually a bad idea to use gets()? Suggest a workaround.