#include <stdio.h> void foo(int) ; int a = 10, b = 20, c = 30 ; void foo (int a) { int b = 3 ; c = a + b ; b = b + 1 ; printf("foo: a = %d, b = %d, c = %d\n", a, b, c) ; } main() { int a = 2 ; printf("main: a = %d, b = %d, c = %d\n", a, b, c) ; foo(5) ; printf("main: a = %d, b = %d, c = %d\n", a, b, c) ; }
Click here for a sample answer.
Click here for a sample answer.