(Paper) BCA : CS72 C++ and Object Oriented Programming Question Papers (Set - 4)

Paper : BCA : CS72 C++ and Object Oriented Programming Question Papers (Set - 4)
Note: Question number 1 is compulsory. Answer any three questions from the rest.

(a) Mention the difference between C and C++. Why is it necessary to include header files in a program written in these languages?

(b) Discuss the basic data types of C++. Suggest appropriate data type for the following:
(1) Someone’s height in meters
(2) An exclamation mark
(3) The number of students in a university

(c) What is the purpose of information hiding?

(d) Write a program, which will accept a string of maximum 10 characters from the keyboard, and count the occurrences of each of the 5 vowels in the string. The output should be in tabbed format as shown below:
0 1 0 0 1

(a) Differentiate between operator and function overloading with the help of suitable example.

(b) Explain the concept of a Destructor in a class. What is its role in terms of cleanup of unwanted objects?

(a) How is a exception handling performed in C++? Write a program that throws an arithmetic exception as and when a number input is greater than 9999.

(b) Write a C++ template function, called exchange ( ) that accepts two arguments of generic type and swaps their contents.

(a) Write a C++ program to print reverse of a 5-digit number.

(b) Explain the concept of metadata.

Define the following:
(i) Polymorphism
(ii) Typecasting
(iii) Class and instance
(iv) Containership
(v) Abstract class