Question 0-2

Consider the following C code.

#include <stdio.h>

int p = 5;

void f(int a, int b) {
    a = 2;
    b = 5;
    p = a + p;
}

int main() {
    int a = 3;
    f(a, p);
    printf("%d %d\n", p, a);
    return 0;
}

Solution

Back to Review for Quiz 0