Question
Easy

In context of C++, which of the following is a valid statement ?

1
Friend function of a class is always member function of that class.
2
Value of static data member cannot be changed once assigned.
3
Keywords private, protected and public may appear in any order and any number of times in a class.
4
Static data member of a class can be accessed only by static member function of that class.
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Object-Oriented Programming (C++)
Topic: Class & Object in C++
Correct Answer
Option C
Explanation

The correct option is (3): Keywords private, protected and public may appear in any order and any number of times in a class. This statement is a correct principle in C++ class design. The access specifiers—private, protected, and public—are used to group class members and define their visibility from outside the class. A programmer is entirely free to organize their class definition by using any of these keywords multiple times…Read More

In context of c - HTET Level 3 | Clear Cutoff