Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

C++ Programming

Cpp Programming Quiz 48 – Which one of the following options is correct?

Question: Which one of the following options is correct?
[A]. Friend function can access public data members of the class.
[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

Cpp Programming Quiz 48 – Which one of the following options is correct? Read More »

Cpp Programming, OOPs Concepts

Cpp Programming Quiz 49 – In which of the following a virtual call is resolved at the time of compilation?

Question: In which of the following a virtual call is resolved at the time of compilation?
[A]. From inside the destructor.
[B]. From inside the constructor.[C]. From inside the main().
[D]. Both A and B.

Answer: Option D

Cpp Programming Quiz 49 – In which of the following a virtual call is resolved at the time of compilation? Read More »

Cpp Programming, OOPs Concepts

Cpp Programming Quiz 50 – Which of the following is the correct way of declaring a function as constant?

Question: Which of the following is the correct way of declaring a function as constant?

[A]. const int ShowData(void) { /* statements */ }
[B]. int const ShowData(void) { /* statements */ }[C]. int ShowData(void) const { /* statements */ }

[D]. Both A and B 

Answer: Option C

Cpp Programming Quiz 50 – Which of the following is the correct way of declaring a function as constant? Read More »

Cpp Programming, OOPs Concepts

Cpp Programming Quiz 51 – Which one of the following is correct about the statements given below?

Question: Which one of the following is correct about the statements given below?
  1. All function calls are resolved at compile-time in Procedure Oriented Programming.
  2. All function calls are resolved at compile-time in OOPS.

[A]. Only II is correct.
[B]. Both I and II are correct.[C]. Only I is correct.
[D]. Both I and II are incorrect.

Answer: Option C

Cpp Programming Quiz 51 – Which one of the following is correct about the statements given below? Read More »

Cpp Programming, OOPs Concepts

Cpp Programming Quiz 53 – Which of the following statements is correct?

Question: Which of the following statements is correct?
[A]. Base class pointer cannot point to derived class.
[B]. Derived class pointer cannot point to base class.[C]. Pointer to derived class cannot be created.
[D]. Pointer to base class cannot be created.

Answer: Option B

Cpp Programming Quiz 53 – Which of the following statements is correct? Read More »

Cpp Programming, OOPs Concepts

Cpp Programming Quiz 55 – Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified?

Question: Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified?
[A]. Call by value
[B]. Call by reference[C]. Default arguments
[D]. Call by pointer

Answer: Option C

 

Cpp Programming Quiz 55 – Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified? Read More »

Cpp Programming, OOPs Concepts

Cpp Programming Quiz 57 – Which of the following concepts means waiting until runtime to determine which function to call?

Question: Which of the following concepts means waiting until runtime to determine which function to call?
[A]. Data hiding
[B]. Dynamic casting[C]. Dynamic binding
[D]. Dynamic loading

Answer: Option C

Cpp Programming Quiz 57 – Which of the following concepts means waiting until runtime to determine which function to call? Read More »

Cpp Programming, OOPs Concepts