Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

Which of the following statement(s) is NOT true regarding the above code? - select option

  Shared By: Addie Fischer    Date: Oct 05    Category: C++ Programming    Views: 2226

Answer:

4. Consider the following code segment:
class A
{
int a;
public:
int b;
void inp();
}
class B : A
{
// members of B
}
Which of the following statement(s) is NOT true regarding the above code?

Options

a) The public members, namely ‘b’ and inp() of class A become private members of class B
b) The public members, namely ‘b’ and inp() of class A can be accessed by the member functions of class B
c) The public members, namely ‘b’ and inp() of class A are inaccessible to the objects of class B
d) None of the above

Answer : d) None of the above

Share: 
 



Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: