Object Oriented Programming
Que- When is downcating used? a. To separate inherited class from base class b. To write a more complex code c. To compare two objects d. To disable one class in inheritance Ans- To compare two objects Que- Why is downcas…
Que- Can data members be passed to a function using the object? a. Yes, it can be passed only inside class functions b. Yes, only if the data members are public and are being passed to a function outside the class c. No, can&…
Que- Which syntax among the following is correct for public member functions? a. public::void functionName(parameters) b. public void functionName(parameters) c. public(void functionName(parameters)) d. public:-void function…