adplus-dvertising
frame-decoration

Question

Which of the following statements is true in C++?

a.

A struct cannot have member functions.

b.

A struct cannot have private members.

c.

The default access modifier of struct is public.

d.

None of the above.

Answer: (c).The default access modifier of struct is public.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following statements is true in C++?

Similar Questions

Discover Related MCQs

Q. C++ supports:

Q. Which of the following is not a C++ keyword?

Q. Which of the following is not a bitwise operator?

Q. In C++, the expression 5/2 is evaluated to:

Q. In C++, the string literal “C++” occupies exactly ………. of memory.

Q. In C++, generic functions are created using the keyword:

Q. The implicit argument passed to a member function of a c++ class is called:

Q. The default copy constructor performs:

Q. Bohm and Jacopini's work demonstrated that all the programs must be written in terms of

Q. Using keywords as an identifier causes

Q. A procedure for solving a problem in terms of actions and their order, is called as

Q. The rectangle symbol in flowchart is called as

Q. Writing a keyword while as While in C++ program causes a

Q. All the keywords bool, catch, private, public, this and throw, were introduced in

Q. ++a is an example of

Q. C++ statements that allow the programmers to specifies that the next statement to be executed may be other than the next one in a sequence, is called as

Q. The C++ control structures are combined in

Q. A UML diagram that facilitates the requirements gathering and interacts between the system and external users, is called as

Q. What is a sequential execution?

Q. A program that specifies that an action is to be repeated while some condition remains true, is called