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
Explain what are the standard predefined macros?
What are the disadvantages of external storage class?
Why do we use static in c?
What is a union?
why wipro wase
What is the purpose of realloc()?
What is the main difference between calloc () and malloc ()?
What is the usage of the pointer in c?
What’s the special use of UNIONS?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
what is a function method?give example?
All technical questions
What is const keyword in c?
find out largest elemant of diagonalmatrix
Explain threaded binary trees?