Question: Compile and run the following program, then answer the questions that follow, based on the output of the program: int f1() { int f2) {

Compile and run the following program, then answer the questions that follow, based on the output of the program: int f1() { int f2) { auto inta; static int s; a= 1: S = 2; printf("F1: %d %d ", a, s); printf("F2: %d %d ", a, s); return ++a; return ++5; int 121 auto int a = 3; printf("F3: %d %d ", a, s); return ++a; int f40) static int s = 0; printf("F4: %d %d ", a, s); return ++s; void f50) { auto int a = 4; f1(); 720); int main() { static int s = 0; auto int a = 0; printf "Main: %d %d ", a, s); f1(); f20); printf("Main: %d %d ", a, s); a = f(); S = 14); printf "Main: %d %d ", a, s); f5(); printf("Main: %d %d ", a, s); a) (15 pts) What is the output of this program? b) (5 pts) What is the maximum number of instances of static integer s' that coexist at any one time during the execution of the program? c) (5 pts)What is the maximum number of instances of automatic integer "a" that coexist at any one time during the execution of the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
