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
Answers were Sorted based on User's Feedback
How to change constant values?
What are the various situations where a copy constructor is invoked?
What is the difference between the parameter to a template and the parameter to a function?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
Which one is a preferred language C or C++? Why?
What is the difference between "calloc" and "malloc"?
whats the size of class EXP on 32 bit processor? class EXP { char c1; char c2; int i1; int i2; char *ptr; static int mem; };
Differentiate between a template class and class template?
Define a constructor?
There is a array of 99 cells and we have to enter 1-100 elements in it , no two elements would repeat , so the is one no. missing because 99 cells and 1-100 nos. so we had to implement a function to find that missing no.
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?