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 38 – Which of the following statement is correct?

Question: Which of the following statement is correct?
[A]. A reference is declared using * operator.
[B]. Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.[C]. A reference must always be initialized within classes.
[D]. A variable can have multiple references.

Answer: Option D

Cpp Programming Quiz 38 – Which of the following statement is correct? Read More »

Cpp Programming, References

Cpp Programming Quiz 39 – Which of the following statement is correct?

Question: Which of the following statement is correct?
[A]. Once a reference variable has been defined to refer to a particular variable it can refer
to any other variable.
[B]. A reference is indicated by using && operator.[C]. Once a reference variable has been defined to refer to a particular variable it cannot refer to any other variable.
[D]. A reference can be declared beforehand and initialized later.

Answer: Option C

 

Cpp Programming Quiz 39 – Which of the following statement is correct? Read More »

Cpp Programming, References

Cpp Programming Quiz 40 – Which of the following statement is correct about the references?

Question: Which of the following statement is correct about the references?
[A]. A reference must always be initialized within functions.
[B]. A reference must always be initialized outside all functions.[C]. A reference must always be initialized.
[D]. Both A and C.

Answer: Option C

Cpp Programming Quiz 40 – Which of the following statement is correct about the references? Read More »

Cpp Programming, References

Cpp Programming Quiz 45 – Which of the following is correct about class and structure?

Question: Which of the following is correct about class and structure?
[A]. class can have member functions while structure cannot.
[B]. class data members are public by default while that of structure are private.[C]. Pointer to structure or classes cannot be declared.
[D]. class data members are private by default while that of structure are public by default.

Answer: Option D

Cpp Programming Quiz 45 – Which of the following is correct about class and structure? Read More »

Cpp Programming, OOPs Concepts