write a program in C to swap two variables
Answer Posted / r.aruna
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter the a value");
scanf("%d",&a);
printf("Enter the b value");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("After swapping a,b value",a,b);
getch();
}
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
Calculate 1*2*3*____*n using recursive function??
What is oops c?
How do you sort filenames in a directory?
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
Why pointers are used?
What are the different types of control structures in programming?
find out largest elemant of diagonalmatrix
Explain setjmp()?
What is the difference between #include and #include 'file' ?
using for loop sum 2 number of any 4 digit number in c language
What is the code in while loop that returns the output of given code?
What is the advantage of an array over individual variables?
What is the difference between local variable and global variable in c?
What does %2f mean in c?
What is an array? What the different types of arrays in c?