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) Is C++ an object oriented language ? Give reasons to justify your answer.
(b) What are looping staternents provided in C++? Explain their syntax.
(c) Write a C++ function called sort( ) to sort a given list of integers. If the need be, it may call a function called swap (int & x, int & y) to exchange the contents of two variables called x and y of type integers
(d) What are the applications of use case diagram and interaction diagram? Give example of each. (5)
(e) What is a constructor? How is it defined and when is it called ? (5)
2. (a) Write a C++ program to calculate first 15 terms of fibonacci series. (5)
[ fibonacci series is defined as
f(n) = f(n-1) + f(n-2)
f(0) = 0
f(1) = 1]
(b) How are dynamic objects created and destroyed ? (5)
3. (a) What is an inline function? What are its limitations? (5)
(b) How are arrays declared in C++ ? How can pointers manipulate array elements ? Give an example. (5)
4. (a) Mention the difference between ad-hoc and universal polymorphism. (5)
(b) Define operator overloading. Why are inherited operators often not very useful in derviced classes? (5)
5. (a) Explain the concept of inheritance with the help of suitable example. (5)
(b) Write a class called Time consisting of the following three methods. (5)
* read_later() - It reads time in the following format
hh : hours
mm : minutes
ss : seconds
* Display_time( )- It displays time in the following format
hh : mm : ss
* Add_time() - It takes two time objects T1 and T2, adds them to give third time object T3.
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