Multiple choice

Which of the following statements is/are correct for classes and objects in C++ language?

  1. Static keyword is used to preserve the value of a variable.

  2. Member functions of a class can also be declared as constants.

  3. The local class has no access to global variables as well as static variables.

  4. Both 1 and 3

  5. Both 1 and 2

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Options 1 and 2 are true.