ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  C++ General
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
Which one of the following describes characteristics of
"protected" inheritance?  
a) The base class has access only to the public or protected
members of the derived class.  
b) The derived class has non-public, inheritable, access to
all but the private members of the base class.  
c) The derived class has access to all members of the base
class.  
d) The private members of the base class are visible within
the derived class.  
e) Public members of the derived class are privately
accessible from the base class.  
 Question Submitted By :: Ramesh.chaluvadi
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Which one of the following describes characteristics of "protected" inheritance? a) The base class has access only to the public or protected members of the derived class. b) The derived class has non-public, inheritable, access to all but the private members of the base class. c) The derived class has access to all members of the base class. d) The private members of the base class are visible within the derived class. e) Public members of the derived class are privately accessible from the base class.
Answer
# 1
Answer is b)
 
Is This Answer Correct ?    0 Yes 0 No
Guest
 
  Re: Which one of the following describes characteristics of "protected" inheritance? a) The base class has access only to the public or protected members of the derived class. b) The derived class has non-public, inheritable, access to all but the private members of the base class. c) The derived class has access to all members of the base class. d) The private members of the base class are visible within the derived class. e) Public members of the derived class are privately accessible from the base class.
Answer
# 2
d
 
Is This Answer Correct ?    0 Yes 0 No
Roshanpr
 
 
 
  Re: Which one of the following describes characteristics of "protected" inheritance? a) The base class has access only to the public or protected members of the derived class. b) The derived class has non-public, inheritable, access to all but the private members of the base class. c) The derived class has access to all members of the base class. d) The private members of the base class are visible within the derived class. e) Public members of the derived class are privately accessible from the base class.
Answer
# 3
the right answer is b
option <b>
 
Is This Answer Correct ?    0 Yes 0 No
Ravi
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
What is a constructor initializer list and when we use constructor initializer list? TCS2
how to swap two numbers with out using temp variable  6
What compiler was used? Intel3
What is the Difference between "printf" and "sprintf"? iSoft2
What is problem with Runtime type identification?  1
Implement strncpy  2
What is difference between initialization and assignment? HP4
How to reduce a final size of executable?  1
class Foo { int x; public: Foo(int I); }; If a class does not have a copy constructor explicitly defined one will be implicitly defined for it. Referring to the sample code above, which one of the following declarations is the implicitly created copy constructor? a) Foo(Foo *f); b) Foo(Foo &f); c) Foo(const Foo *f); d) Foo(const Foo &f); e) Foo(int); Quark3
class HasStatic { static int I; }; Referring to the sample code above, what is the appropriate method of defining the member variable "I", and assigning it the value 10, outside of the class declaration? a) HasStatic I = 10; b) int static I = 10; c) static I(10); d) static I = 10; e) int HasStatic::I = 10; Quark1
difference between c and c++? Infosys6
In a class only declaration of the function is there but defintion is not there then what is that function? Hughes4
class Alpha { public: char data[10000]; Alpha(); ~Alpha(); }; class Beta { public: Beta() { n = 0; } void FillData(Alpha a); private: int n; }; How do you make the above sample code more efficient? a) If possible, make the constructor for Beta private to reduce the overhead of public constructors. b) Change the return type in FillData to int to negate the implicit return conversion from "int" to "void". c) Make the destructor for Alpha virtual. d) Make the constructor for Alpha virtual. e) Pass a const reference to Alpha in FillData Quark1
How to stop conversions among objects? Symphony1
How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever Quark8
What are the basics of classifying different storage types, why? Symphony1
what is the behaviour of C and C++ compiler for the below statements. int *p; p = malloc(100); Is the behaviour same ? or different ?  1
class basex { int x; public: void setx(int y) {x=y;} }; class derived : basex {}; What is the access level for the member function "setx" in the class "derived" above? a) private b) local c) global d) public e) protected Quark1
Is there something that we can do in C and not in C++? Patni5
In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. GE3
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com