Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

BACHELOR IN COMPUTER

APPLICATIONS
Term-End Er<amination
June, 20O8

TO Gr.+
CG-16: INTRODUCTION

Time: 2 hours MaxlmumMorks: 75

Note : Questionnumber 7 is compulsory. Answerany


thtee questionsfrom the rest.UseC++ wherever
necessafy,

1. (a) Write a program In C++ to simulatethe lunctionality


ol a simple calculator to perform addiiion,
subtraction, division, multiplicafon and to lind
percentage. 10

(b) Write a program in C++ to count the number of


alphabetsand blank-spacesin a given string' 10

(c) With the help ol example program code in C++


explain the following featuresof OOPS : 2x5=70
_
(t Overloading
(ii) Inheritance

cc-16 P.T.O.
2. (a) Write an inline function to {ind the largest number
among three given numbers. 7
(b) Write a program in C++ to find the difference
between two metrices of size n x n. g

3. (a) Give the syntax for the following statements of C++


along with an example for each : g
(i) For loop
(ii) While loop
(iii) coTo.
(iv) Switch
(b) Write a program in C++ to find the GCD (Greatest
Common Divisor) of the two giwn numbers. 7

4, (a) With the help of a sampleprogram segmentin C++,


explain the significanceof array of objects. s
(b) Write a program in C++ to search for a given
number in given list oI "N" numbers.Use any of the
searchingtechniquesand explain the program logic. 10

5. Write short notes on : SxS=15


(i) Data Encapsulation
(ii) I/O file sheams
(iii) Public, Private and protected sgrcifiers
(iv) Increment and Decrement oDerators
(v) Tyrpe Conversion

cc-16 2,000

You might also like