what is variable swapping in c language
Answers
Answered by
0
It means interchanging the value of one variable to another.
Ex:
#include<stdio.h>
void main()
{
int a = 10, b = 6, c;
c=a;
a=b;
b=c;
printf("a=%d and b=%d", a,b);
getch();
}
Hope this helps!
Ex:
#include<stdio.h>
void main()
{
int a = 10, b = 6, c;
c=a;
a=b;
b=c;
printf("a=%d and b=%d", a,b);
getch();
}
Hope this helps!
Similar questions
Computer Science,
7 months ago
Math,
7 months ago
Geography,
7 months ago
Chemistry,
1 year ago
English,
1 year ago