Description:
Swap two variables using a temporary variable.
Swap two variables using a temporary variable.
C Code
#include <stdio.h>
int main() {
int a = 5, b = 10, temp;
temp = a; a = b; b = temp;
printf("a = %d\nb = %d\n", a, b);
return 0;
}
Expected Output
a = 10
b = 5