0% found this document useful (0 votes)
5 views

pgdca9(16.05.2018)

This document is an examination paper for a PGDCA course on Object Oriented Programming Using C++. It includes multiple sections with various types of questions, including multiple choice, short answer, and programming tasks. The paper assesses knowledge on C++ concepts such as memory allocation, constructors, and operator overloading.

Uploaded by

BRIJ MOHAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

pgdca9(16.05.2018)

This document is an examination paper for a PGDCA course on Object Oriented Programming Using C++. It includes multiple sections with various types of questions, including multiple choice, short answer, and programming tasks. The paper assesses knowledge on C++ concepts such as memory allocation, constructors, and operator overloading.

Uploaded by

BRIJ MOHAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SET-C

Roll No.

Class : PGDCA
Subject Name: Object Oriented Programming Using C++
Paper Code – PGDCA 9
Max. Time: 3 hours Max. Marks: 70

Note: All Sections are compulsory.


SECTION-A
1. Attempt all the questions. (1×
×10)=10
I. If an array is declared as int a[4] = {3, 0, 1, 2}, then values assigned to a[0] & a[4] will be:-
(A)3, 2 (B)0, 2 (C) 3, 0 (D) 0, 4
II. A function call mechanism that passes arguments to a function by passing a copy of the values of
the arguments is
(A) call by name (B)call by value
(C)call by reference (D)call by value result
III. In C++, dynamic memory allocation is accomplished with the operator
(A) new (B) this (C) malloc (D)delete
IV. The operator that cannot be overloaded is
(A)++ (B):: (C) ( ) (D) ~
V. Within a switch statement
(A) Continue can be used but Break cannot be used
(B) Continue cannot be used but Break can be used
(C) Both Continue and Break can be used
(D) Neither Continue nor Break can be used
VI. It is possible to declare as a friend
(A) a member function (B)a global function
(C) a class (D)all of the above
VII. The members of a class, by default, are
(A) public (B) protected
(C) private (D) mandatory to specify
VIII. How many constructors can a class have?
(A)0 (B) 1 (C)2 (D) any number
IX. A white space is :
(A) blank space (B) new line (C)tab (D) all of the above
X. A copy constructor takes
(A) no argument (B)one argument
(C)two arguments (D)arbitrary no. of arguments

SECTION-B
Attempt all questions. (2x5)=10

2. Give syntax of for loop.


3. Write down the applications of Object-oriented programming.
4. Write down the name of operators that cannot be overloaded.
5. Write syntax for overloading a unary operator using friend function.
6. How many arguments are required in the definition of an overloaded binary operator?
SET-C
Roll No.

SECTION-C
Attempt all questions. (5x6) =30

7. What is the difference between procedure-oriented programming and object-oriented programming?


8. What are the data types used in C++?
9. Differentiate call by value and call by reference using a suitable example.
10. What is copy constructor? How do we invoke copy constructor.
11. Give the syntax of Switch statement. Explain with the suitable example.
12. What is the difference between while loop and do-while loop.

SECTION-D
Attempt any two questions. (10×
×2)=20

13. Write a program to demonstrate the working of parameterized constructor.


14. Write a program to overload unary – operator using friend function.
15. Write a program to overload a function sum().

You might also like