adplus-dvertising
frame-decoration

Question

If you want only one memory location to be reserved for a class variable, no matter how many objects are instantiated, you should declare the variable as

a.

static

b.

unary

c.

dynamic

d.

volatile

Answer: (a).static

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. If you want only one memory location to be reserved for a class variable, no matter how many objects are instantiated, you should declare the variable as

Similar Questions

Discover Related MCQs

Q. Which of the following are valid characters constants?

Q. To create and execute a C++ program, you need to have access to

Q. Many programmers separate a class into two files: _____

Q. Files whose names end in .h are called _____ files

Q. Assume that a program contains a programmer-defined void function. When C++ encounters the function's closing brace (}), C++ returns to the statement _____

Q. A _____ is a single item of information about a person, place, or thing

Q. Which (if any) of the following is NOT a programmer-defined type

Q. A file pointer always contains the address of the file

Q. In a simple 'if' statement with no 'else'. What happens if the condition following the 'if is false?

Q. Which of the following is not a programming control structure?

Q. The bitwise OR operator is a

Q. The continue statement should be written only

Q. A major advantage of inheritance is

Q. When a variable exists or is accessible, it is said to be _____

Q. The feature that allows the same operations to be carried out differently depending on the object is _____

Q. Which of the following is a C++ class?

Q. Precedence determines which operator

Q. When using the standard files that come with the C++ compiler, you should surround the header file name with _____

Q. The loop condition in a flowchart is represented by a(n) _____

Q. Which of the following, if any, are invalid names for a variable?