Question: Lab 4 Part II: Local and Global Variables Step 1 : Depending on your operating system, download ( lab 4 _ part 2 _ win.zip
Lab Part II: Local and Global Variables
Step : Depending on your operating system, download lab
partwin.zip or
lab
part
macOS.zip the starting code from Brightspace and extract the zipped file.
Step : Open the unzipped folder in VS Code
Step : labpartxxx folder contains the following files:
labtest.h contains the declarations function prototypes for the functions defined in
labtest.c Do not modify labtest.h and labtest.c
main.c contains the main function. Do not modify main.c
Step : Open each of the files, get familiar with the variables and identify the scope of each of them.
Step : Answer the following questions and show your answers to the TAs:
What is the scope of variable defined inside main.c
Are any of the variables variable defined inside labtest.c the same as the variable defined inside
main.c
Does the assignment statement inside labtest.c line modify the content of variable inside
main.c
How many distinct variables i there are in main.c If more than one, what is the scope of each of
them?
How many distinct variables variable there are in main.c If more than one, what is the scope
of each of them?
In labtest.c is the variable inside test the same as the variable inside test
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
