Module 1 Question Bank (8 Marks each)
1 What is object-oriented programming? Discuss the main features of C++?
2 List the differences between C and C++?
3 Describe the basic structure of a C++ program with a suitable example.
4 Discuss various C++ tokens and provide examples for each.
5 Describe reference variables and demonstrate their usage with an example program.
6 Discuss the need and syntax of function prototypes in C++ with examples.
7 Discuss how function overloading works in C++ with proper examples.
8 Describe how to define a class and its objects in C++ with proper syntax and examples.
9 Describe how to access class members in C++ with syntax and examples.
10 Describe the different storage classes in C++ with suitable examples.
11 Describe the concept of arrays of objects in C++ with suitable examples.
12 Discuss how to define and use functions that return objects in C++ with examples.
13 Discuss how constructors and destructors are defined and used in C++ with examples.
14 Explain the hierarchy and purpose of stream classes in C++.
15 Describe unformatted input/output operations in C++ with proper syntax and examples.
16 Illustrate the definition of member functions in C++ with proper syntax and sample programs.
17 Write a C++ program to find the largest of three numbers.
18 Write a C++ program to check if a number is even or odd.
19 Write a C++ program to swap the values of a pair of integers using reference variables.
Write a C++ program to compute the area of triangle, square, rectangle, and circle by
20
overloading the area() function.