Professional Documents
Culture Documents
of Pages : 5
BCS–C-101
B. Sc. SEMESTER I
EXAMINATION, Feb., 2021
Subject : COMPUTER SCIENCE
Paper Name : Object Oriented
Programming Using C++
Time : Three Hours ] [ Maximum Marks : 70
Note : Question paper is divided into two Sections
A and B. Attempt both Sections. Answer
questions as per instructions given.
Section—A
(Short Answer Type Questions)
Note : Attempt any five questions in about
150 words each. Each question carries
6 marks. (5×6=30)
1. Obtain the output from the following C+ +
program as expected to appear on the screen
after its execution.
#include<iostream>
using namespace std;
P. T. O.
[2] BCS–C-101
int main()
{
char *Text = "AJANTA";
int *P, Num[] = {11,5,7,9};
P = Num;
cout<<*P<<Text<<endl;
Text++;
P++;
cout<<*P<<Text<<endl;
return 0;
}
2. Why does C++ introduce reference variable ?
3. How are constructors different from member
functions ?
4. Why is friend function required ? Explain with
an example.
5. What is the ambiguity that arises in multiple
inheritance ? How it can be overcome ?
Explain with example.
6. What is the need of virtual function ? With an
example, explain overriding of member
function of base in derived class.
[3] BCS–C-101
x 2 x 4 x6
cos ( x) =1− + − + .....
2! 4! 6!
BCS–C-101
P. T. O.