Question: Write a program with a main that calls a function void mycount() 20 times. Create a global variable outside the main, a local variable in
Write a program with a main that calls a function void mycount() 20 times. Create a global variable outside the main, a local variable in the function, and a static variable in the function. Increment all the variables when the function mycount is called and print the value of each of the variables to the screen in each function call. In addition, print the values of the variables that are accessible from the main to screen at the end of the program.
Please use Language C!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
