What are manipulators? Write a cout statement using manipulator to print a float number right justified in the width of 10 columns with precision of 2 digits.
“OOP follows the bottom up approach of programming” Explain in short
Can a member function be declared as private member of a class? How can it be accessed?
Write the function for the following operations, using appropriate OOP concept such that the code is minimized.
Find product of two numbers
Find product of three numbers.
Find product of four numbers
Give the syntax for pass by reference? Compare pass by reference and pass by pointer(address), and conclude which one is preferable and why?
What problem may arise with the following functions in a program ? Explain.
int fun();
Int fun(int x=0 ,int y=0);
Choose the correct alternative and justify it.
The advantage of inline function is
A. it takes less memory
B. it takes less time to compile
C. it takes less time to execute
D. It is easy to write.
“Compiler always provides an implicit default constructor for every class”. True or False. Justify your answer
Is it allowed to define constructor in private section of the class?If no, then give explanation for the same. If yes then explain how will it be accessible.
When do need to include the explicit destructor in a class?Explain with example.
Write a program to define a class A with data member x and a parameterised constructor to initialize it. Define a class B with data member y and a parameterised constructor to initialize it. Write a function to calculate and print LCM of x & y.