Get premium membership and access revision papers, questions with answers as well as video lessons.

Comp 212:Object Oriented Programming With C++ March 2011 Question Paper

Comp 212:Object Oriented Programming With C++ March 2011 

Course:Bachelor Of Computer Science

Institution: Kabarak University question papers

Exam Year:2011



KABARAK UNIVERSITY

UNIVERSITY EXAMINATIONS
2010/2011 ACADEMIC YEAR
FOR THE DEGREE OF BACHELOR OF COMPUTER SCIENCE
COURSE CODE: COMP 212
COURSE TITLE: OBJECT ORIENTED PROGRAMMING
WITH C++

STREAM: Y2S1
DAY: TUESDAY
TIME: 2.00 – 4.00 P.M.
DATE: 22/03/2011


INSTRUCTIONS:
1. Section A is compulsory and has 30 marks.
2. Attempt any TWO questions from Section B. Each question has 20 marks.



SECTION A
QUESTION 1 (30 MARKS)
a) Being an expert in C++ programming; explain the basic structure of any C++
program. (5 marks)
b) Give y=5, write a C++ program to solve the following equation 3x +2y =16 and print
the value of x as an output. (5 marks)
c) Write a C++ program that implements a function declaration, a function definition
and a function call. (5 marks)
d) Explain in details any five data types used in C++ programming specifying how
many bytes they occupy in memory. (5 marks)
e) With the help of a code explain how objects are created in any C++ program using
classes. (5 marks)
f) Decision making can be done in different ways in C++ programming, explain with a
code example how the IF--ELSE statement is used in C++. (5 marks)


SECTION B
QUESTION 2 (20 MARKS)
a) As a programmer briefly explain the differences between the interpreter language and
the compiler language. (4 marks)
b) What is an array? Show how an array is declared and initialized in any C++ program.
(4 marks)
c) What is a pointer? Explain with code examples how to define Pointer Variables in
C++. (4 marks)
d) How would you define Abstraction in your own understanding? Explain four Reasons
for the need of Abstraction in C++. (4 marks)
e) In programming what is a function? Explain the features of a function in C++.
(4 marks)

QUESTION 3 (20 MARKS)
a) Being a software programmer, State any four advantages of polymorphism in C++?
(4 marks)
b) Explain the concept of multiple inheritances as used in C++. (4 marks)
c) Write a C++ program to find the average of any given three numbers. (4 marks)
d) Briefly explain what a Structure is and how structures are declare in C++. (4 marks)
e) List any four factors a programmer should consider while using static member functions
(4 marks)

QUESTION 4 (20 MARKS)
a) Explain the following features of object oriented programming as used in C++.
(4 marks)
(i) Extensibility
(ii) Reusability
b) As a software expert explain the features of a class in C++ programming? (4 marks)
c) Write a C++ program to explain the use of the DO – WHILE LOOP in any C++
program. (4 marks)

d) What is type conversion? Explain the two ways that are used to achieve type
conversion in C++. (4 marks)
e) What is an argument? Explain the two type of argument passing that can be used in
C++. (4 marks)

QUESTION 5 (20 MARKS)
a) What is a storage class? Discuss the three types of storage class variables in C++
giving examples. (4 marks)
b) All programs are algorithms but not all algorithms are programs. List any four
qualities that in order to qualify as an algorithm, a sequence of instructions must possess.
(4 marks)
c) Write a C++ program to find the prime numbers which are less than twenty five.
(4 marks)
d) What is an access specifier? As a software consultant explain the three main types of
class access specifiers used in C++ programming. (4 marks)
e) Being the senior software developer what are the advantages of encapsulation in
OOP? (4 marks)






More Question Papers


Popular Exams



Return to Question Papers