Why is it silly to have a static declaration (such as static int count;) above the main function? (That is, why is it silly to have a global, static variable?)

What will be an ideal response?

A global variable remains in scope as long as the program is running. A static variable (is intended to be local) and it retains its value as long as the program is running. A global variable already retains its value, so there is no need to declare it static.

Computer Science & Information Technology

You might also like to view...

A workbench is used to prepare hardware devices for investigative analysis. When cloning a device, the computer's case is opened to remove the ________

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A ____ provides a controlled method for users to open the objects in a database.

A. report B. navigation form C. data access page D. query

Computer Science & Information Technology