write a program in C to swap two variables
Answer Posted / anju
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,temp;
scanf("%d%d",&a,&b);
printf("before swapping value of a=%d and b=%d",a,b);
temp=x;
x=y;
y=temp;
printf("after swapping value of a=%d and b=%d",a,b);
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How does struct work in c?
What is the meaning of 2d in c?
How to Throw some light on the splay trees?
Write the control statements in C language
There seem to be a few missing operators ..
Explain the difference between #include "..." And #include <...> In c?
Explain union. What are its advantages?
What are the types of pointers?
Combinations of fibanocci prime series
The difference between printf and fprintf is ?
Explain how can I read and write comma-delimited text?
What are the types of bitwise operator?
Explain how can type-insensitive macros be created?
Does c have function or method?
Write a program to print numbers from 1 to 100 without using loop in c?