Describe the basic structure of a C++ program with all necessary blocks.
[7 marks]Differentiate Object Oriented Programming (OOP) and Procedure Oriented Programming (POP).
[3 marks]Write a C++ program to find out the sum and average of three numbers using nesting of member function.
[4 marks]Write a C++ program to find volume of cube, cylinder and rectangular box using concepts of function overloading. (volume of cube = s3, volume of cylinder is π*r2*h, volume of rectangular box is l*b*h)
[7 marks]When can you make function inline? What are the advantages of making function inline?
[3 marks]Following is a main() program. void main() { time T1; int duration = 85; T1 = duration; } Where time is a class which contains variables hrs and minutes. duration stores total time in minutes. Define a class time with necessary functions to break up the duration in maximum hours and remaining minutes and store them into hrs and minutes respectively.
[4 marks]Write a C++ program that overloads + operator to add two complex numbers.
[7 marks]Consider following class declarations. class ABC; class XYZ{ int x; public: void get_x(int i) {x=i;} friend void sum(XYZ,ABC); }; class ABC{ int y; public: void get_y(int i) {y=i;} friend void sum(XYZ,ABC); }; By considering above class declarations, define a function sum() at outside the class to find out the sum of x and y and display the result. Also define the main() which satisfy above class declarations.
[4 marks]An unsigned int can be twice as large as the signed int. Explain how?
[3 marks]Write a C++ program to swap the values of pair of integers using function and call by reference.
[4 marks]Explain various forms of inheritance with suitable diagrams and example of each.
[7 marks]Differentiate structure and class in C++.
[3 marks]List out the characteristics of constructor in C++. Write a program to illustrate the use of copy constructor.
[7 marks]Explain virtual base class with a program.
[4 marks]Differentiate between late binding and early binding.
[3 marks]Desribe different ways to open file with suitable example.
[4 marks]Define polymorphism? How is it achieved in C++? Explain with suitable example.
[7 marks]Describe the syntax and use of set () function with suitable example.
[3 marks]Demonstrate the use of static variables and static functions with a program.
[7 marks]Describe the significance of this pointer with suitable example.
[3 marks]Explain following file modes. a. ios::app b. ios::out c. ios::binary d. ios::nocreate
[4 marks]Define Exception? Explain Exception Handling Mechanism. Write a program that demonstrates use of multiple catch.
[7 marks]Explain pure virtual function with suitable example.
[3 marks]Describe the various approaches by which we can detect the end of file condition.
[4 marks]Write a C++ program to copy the contents of a file A.txt into another file B.txt.
[7 marks]