Need help about a course? |
|
Home / Test Papers / Indira Gandhi National Open University / CS72 C++ and Object Oriented Programming CS72 C++ and Object Oriented Programming June 2007 | Ask a question Print this page |
BACHELOR IN COMPUTER APPLICATIONS
Term-End Examination
Time: 2 hours
Maximum Marks: 60
June 2007
1. (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 : (5)
(i) Someone's height in meters
(ii) An exclamation mark
(iii) 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 : (12)
A E I O U
0 1 0 0 1
2. (a) Differentiate between operator and function overloading with the help of suitable example. (5)
(b) Explain the concept of a destructor in a class. What is its role in terms of cleanup of unwanted objects ? (5)
3. (a) How is the exception handling performed in C++? Write a program that throws an arithmetic exception as and when a number input is greater than 9999. (6)
(b) Write a C++ template function, called exchange() that accepts two arguments of generic type and swaps their contents. (4)
4. (a) Write a C++ program to print reverse of a 5-digit number.
(b) Explain the concept of metadata.
5. Define the following : (10)
(i) Polymorphism
(ii) Typecasting
(iii) Class and instance
(iv) Containership
(v) Abstract class
Business Schools - Engineering Colleges - Medical & Nursing Admissions - BEd in Distance mode - Journalism & Media Studies - IGNOU
Enter a detailed keyword. Ex: Question Papers of Indira Gandhi National Open University MCA Ist Semester