Cpp Programming Quiz 48 – Which one of the following options is correct?
[B]. Friend function can access protected data members of the class.[C]. Friend function can access private data members of the class.
[D]. All of the above.
Answer: Option D
Answer: Option D
Answer: Option B
#include
class IndiaBix
{
int Num;
public:
IndiaBix(int x)
{
Num = x;
}
int BixFunction(void);
};
int IndiaBix::BixFunction(void)
{
static int Sum = 0;
int Dec;
Dec = Num % 10;
Num = Num / 10;
if((Num / 100)) BixFunction();
Sum = Sum * 10 + Dec;
return Sum;
}
int main()
{
IndiaBix objBix(12345);
cout<< objBix.BixFunction();
return 0;
}
[A].123
[B].321
[C].345
[D].12345
Answer: Option C
[B].
[C].
[D].
Answer: Option D
Explanation:
No answer description available for this question.
[A].Only 1 is correct.
[B].Only 2 is correct.[C].Both 1 and 2 are correct.
[D].Both 1 and 2 are incorrect.
Answer: Option B
The compiler always provides a zero argument constructor.
[C].
It is necessary that a constructor in a class should always be public.
[D].
Both B and C.
Answer: Option D
Explanation:
No answer description available for this question.
can be overloaded
[C].
can be called
[D].
can be nested
Answer: Option B
Explanation:
No answer description available for this question.