Question: What is the output of the program below when compiled using: gcc main.c func.c main.cfunc.c extern int x; static int y = 2 ; extern

What is the output of the program below when compiled using:
gcc main.c func.c
main.cfunc.c
extern int x;
static int y =2;
extern int z;
void func(){
x = x + y;
y =4+ z;
z = x + y;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!