+ 1
What is ment by swapping in c
2 Answers
+ 6
It could be one of several things like interchanging the values of two variables. The term is also sometimes used when data is written by the OS from memory into disk.
+ 5
I never heard of something special like swapping in C, but maybe you mean swapping of two values?
Swapping values of a and b could look like this:
int a = 10;
int b = 20;
int c;
c = a;
a = b;
b = c;
// a == 20, b == 10