C-Kurs/Call by reference/Musterlösung
< C-Kurs | Call by reference
#include <stdio.h> void swap(int *a, int *b) { int c = *a; *a = *b; *b = c; } int main() { int a = 3; int b = 4; printf("a = %d, b = %d\n", a, b); swap(&a, &b); printf("a = %d, b = %d\n", a, b); return 0; }