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
Why is extern used in c?
Is c procedural or functional?
What is #define?
Dont ansi function prototypes render lint obsolete?
Is there a way to jump out of a function or functions?
I need a sort of an approximate strcmp routine?
Differentiate abs() function from fabs() function.
How are portions of a program disabled in demo versions?
Why we write conio h in c?
Was 2000 a leap year?
How can I run c program?
Where is volatile variable stored?
What is equivalent to ++i+++j?
Write a program to print factorial of given number using recursion?
How many types of functions are there in c?