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...

List the three approaches to complex random sampling.

What will be an ideal response?

Computer Science & Information Technology

You can use Date() in the default value property to insert the current date when a new record is added

Indicate whether the statement is true or false

Computer Science & Information Technology

You can use a string's Value property to determine the number of characters it stores.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A connection between two tables using a common field.

What will be an ideal response?

Computer Science & Information Technology