/** * This files reviews functions and introduces variable scope. * */ // A global variable is accessible throughout your program. int global_var; void main(){ global_var = 4; f1(); // What will happen if we uncomment the line below // and try to print the value of local_var1? // printf("local_var1 %d\n", local_var1); global_var = f4(global_var); printf("global_var %d\n", global_var); } void f1(){ int local_var1 = 23; // accessible from this function only local_var1 = global_var; printf("local_var1 %d\n", local_var1); f2(); f3(12); } void f2(){ int local_var2 = 92; // accessible from this function only // Is the statement below, if uncommented, valid and correct? //local_var2 = local_var1; printf("local_var2 %d\n", local_var2); } void f3(int local_var1){ printf("local_var1 %d\n", local_var1); } // What does function f3 do? int f4(int x){ x = x * 2; return x; }