0% found this document useful (0 votes)
11 views24 pages

C++ 2001 - (A)

The document is a question paper for an exam on Object Oriented Programming Using C++. It contains 36 multiple choice questions related to OOP concepts like classes, objects, inheritance, encapsulation, polymorphism etc. and C++ programming basics. The questions test the students' understanding of key topics in OOP and C++

Uploaded by

dixit895akku
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)
11 views24 pages

C++ 2001 - (A)

The document is a question paper for an exam on Object Oriented Programming Using C++. It contains 36 multiple choice questions related to OOP concepts like classes, objects, inheritance, encapsulation, polymorphism etc. and C++ programming basics. The questions test the students' understanding of key topics in OOP and C++

Uploaded by

dixit895akku
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/ 24

Paper Code Á’uiqfLrdk Øekad

Question Booklet No.


Roll No.----------------------
3 6 3
(To be filled in the
OMR Sheet)

O.M.R. Serial No. Á’uiqfLrdk lhjht


Question Booklet Series
A
BCA (Second Semester) Examination, July-2022
BCA-2001
Object Oriented Programming Using C++
Time : 1:30 Hours Maximum Marks-100

tc rd dgk u tk;] bl Á’uiqfLrdk dks u [kksysa


funsZ’k % & 1. ijh{kkFkhZ vius vuqØekad] fo”k; ,oa Á’uiqfLrdk dh lhjht dk fooj.k ;FkkLFkku lgh& lgh Hkjsa]
vU;Fkk ewY;akdu esa fdlh Hkh Ádkj dh folaxfr dh n’kk esa mldh ftEesnkjh Lo;a ijh{kkFkhZ dh gksxhA
2. bl Á’uiqfLrdk esa 100 Á’u gSa] ftues ls dsoy 75 Á’uksa ds mRrj ijh{kkfFkZ;ksa }kjk fn;s tkus gSA
ÁR;sd Á’u ds pkj oSdfYid mRrj Á’u ds uhps fn;s x;s gSaA bu pkjksa esa ls dsoy ,d gh mRrj
lgh gSA ftl mRrj dks vki lgh ;k lcls mfpr le>rs gSa] vius mRrj i=d (O.M.R.
ANSWER SHEET) esa mlds v{kj okys o`Rr dks dkys ;k uhys cky IokabV isu ls iwjk Hkj nsaA
;fn fdlh ijh{kkFkhZ }kjk fdlh iz’u dk ,d ls vf/kd mŸkj fn;k tkrk gS] rks mls xyr mŸkj ekuk
K-363

tk;sxkA
3. ÁR;sd Á’u ds vad leku gSaA vki ds ftrus mRrj lgh gksaxs] mUgha ds vuqlkj vad Ánku fd;s
tk;saxsA
4. lHkh mRrj dsoy vksŒ,eŒvkjŒ mRrj i=d (O.M.R. ANSWER SHEET) ij gh fn;s tkus
gSaA mRrj i=d esa fu/kkZfjr LFkku ds vykok vU;= dgha ij fn;k x;k mRrj ekU; ugha gksxkA
5. vksŒ,eŒvkjŒ mRrj i=d (O.M.R. ANSWER SHEET) ij dqN Hkh fy[kus ls iwoZ mlesa fn;s
x;s lHkh vuqns’kksa dks lko/kkuhiwoZd i<+ fy;k tk;A
6. ijh{kk lekfIr ds mijkUr ijh{kkFkhZ d{k fujh{kd dks viuh vksŒ,eŒvkjŒ ‘khV miyC/k djkus ds ckn
gh ijh{kk d{k ls ÁLFkku djsaA
7. fuxsfVo ekfdZax ugha gSA
egRoiw.kZ % & Á’uiqfLrdk [kksyus ij ÁFker% tkWp dj ns[k ysa fd Á’uiqfLrdk ds lHkh i`”B HkyhHkkWfr Nis gq, gSaA ;fn
Á’uiqfLrdk esa dksbZ deh gks] rks d{k fujh{kd dks fn[kkdj mlh lhjht dh nwljh Á’uiqfLrdk ÁkIr dj ysaA
Series-A BCA-2001 / K-363 Page - 2
1. In object oriented Programming the program is divided into _________.
(A) Class
(B) Object
(C) Function
(D) None of these
2. Which one is the Object Oriented Programming language ?
(A) Cobol
(B) C
(C) C++
(D) Both C & C++
3. The wrapping up of data and functions into a single unit is called _________.
(A) Inheritance
(B) Encapsulation
(C) Data hiding
(D) Polymorphism
4. The process by which objects of one class acquire the properties of objects of
another class is called ______________.
(A) Abstraction
(B) Inheritance
(C) Encapsulation
(D) Polymorphism
5. In OOP which concept provides the idea of reusability :
(A) Inheritance
(B) Encapsulation
(C) Data hiding
(D) Polymorphism

Series-A BCA-2001 / K-363 Page - 3


6. The process of making an operator to exhibit different behaviours in different
instances is called ___________.
(A) Function overloading
(B) Operator overloading
(C) Inheritance
(D) None of these
7. The process of making a function to exhibit different behaviours in different
instances is called ____________.
(A) Function overloading
(B) Operator overloading
(C) Inheritance
(D) None of these
8. Objects communicate with one another by using ____________.
(A) Message passing
(B) Operator overloading
(C) Inheritance
(D) Both (A) & (B)
9. Through _____________ we can eliminate redundant code and extend the use of
existing class.
(A) Inheritance
(B) Operator overloading
(C) Encapsulation
(D) Both (A) & (B)
10. The __________ principle helps the programmer to build secure programs.
(A) Operator overloading
(B) Encapsulation
(C) Data hiding
(D) Polymorphism

Series-A BCA-2001 / K-363 Page - 4


11. What are the basic run time entities in an object oriented program ?
(A) Objects
(B) Functions
(C) Datas
(D) None of these
12. OOPs follows _______________ approach during program design.
(A) Top down
(B) Bottom-up
(C) Both (A) & (B)
(D) None of these
13. The technique of Hiding internal details in an object is called _________.
(A) Encapsulation
(B) Functions
(C) Abstraction
(D) Inheritance
14. Classes are ___________ datatype.
(A) Derived
(B) User-defined
(C) Built-in
(D) Both (A) & (C)
15. _______________ provides interface between the object’s data and program.
(A) Object
(B) Functions
(C) Class
(D) Polymorphism

Series-A BCA-2001 / K-363 Page - 5


16. _____________ refers to the linking of procedure call to the code to be executed in
response to the call.
(A) Polymorphism
(B) Functions
(C) Dynamic binding
(D) Object
17. A _______________ for an object is a request for execution of a procedure.
(A) Object
(B) Functions
(C) Dynamic binding
(D) Message discuss
18. The << operator is known as ___________________.
(A) Put to
(B) Get from
(C) Insertion
(D) Both (A) & (C)
19. The >> operator is known as ________________.
(A) Put to
(B) Get from
(C) Extraction
(D) Both (B) & (C)
20. ______________ contains function prototype for the standard input and output
functions.
(A) iomanip.h
(B) iostream.h
(C) stdlib.h
(D) Both (A) & (B)

Series-A BCA-2001 / K-363 Page - 6


21. In C++ default return type for all the functions is _______________.
(A) Int
(B) Void
(C) Float
(D) None of these
22. The multiple use of input and output operator is called _____________.
(A) Polymorphism
(B) Inheritance
(C) Cascading
(D) None of these
23. Which of the following is not a feature of OOPs?
(A) Polymorphism
(B) Inheritance
(C) Dynamic binding
(D) None of these
24. By default, the members of a C++ class are :
(A) Private
(B) Public
(C) Protected
(D) None of these
25. Which of the following function that must contain in all C++ Programs :
(A) start()
(B) system()
(C) main()
(D) program()

Series-A BCA-2001 / K-363 Page - 7


26. Which one of the following is the correct operator to compare two values :
(A) :=
(B) =
(C) Equal
(D) = =
27. C++ is originally developed by :
(A) Nicolas Wirth
(B) Dennis Ritchi
(C) Bjarne Stroustrup
(D) Ken Thompson
28. Identify the unary operator :
(A) ? , :
(B) ++
(C) +
(D) %
29. The ________ are used to check the relationship between two numeric operands or
expressions.
(A) Logical operators
(B) Relational operators
(C) Arithmetic operators
(D) Bitwise operators
30. ____________ is a function that is expanded in line when it is invoked.
(A) Library function
(B) User defined function
(C) Inline function
(D) None of these

Series-A BCA-2001 / K-363 Page - 8


31. The qualifier ___________ tells the compiler that the function should not modify
the argument.
(A) Const
(B) Static
(C) Constant
(D) Inline
32. _________ refers to the use of the same thing for different purpose.
(A) Function declaration
(B) Overloading
(C) Function calling
(D) Prototyping
33. The functions declared inside the class is known as __________.
(A) Data members
(B) Library functions
(C) Member functions
(D) User defined functions
34. Calling a member function by using its name from another member function of the
same class is known as ___________.
(A) Grouping of member function
(B) Member function group
(C) Nesting of member function
(D) Nested group of member function
35. ________ function can only be called by another function that is a member of its
class.
(A) Member function
(B) Private member function
(C) Nested member function
(D) Public member function

Series-A BCA-2001 / K-363 Page - 9


36. ______________ are normally used to maintain values common to the entire class.
(A) Dynamic variables
(B) Static variables
(C) Private variables
(D) Public variables
37. A static variable is initialized to ___________ when the first object of its class is
created.
(A) 1
(B) Null
(C) 0
(D) None of these
38. A function calling itself :
(A) Inline function
(B) Static function
(C) Friend function
(D) Recursion
39. Which of the following is not a type of constructor ?
(A) Copy constructor
(B) Friend constructor
(C) Default constructor
(D) Parameterized construct
40. Constructor is executed when ____________.
(A) An object is created
(B) An object is used
(C) A class is declared
(D) An object goes out of scope

Series-A BCA-2001 / K-363 Page - 10


41. Which of the following also known as an instance of a class ?
(A) Friend functions
(B) Object
(C) Member functions
(D) Member Variables
42. A constructor that accepts _________________ parameters is called the default
constructor.
(A) One
(B) Two
(C) No
(D) Three
43. Destructor has the same name as the constructor and it is preceded by __________.
(A) !
(B) ?
(C) ~
(D) $
44. Which constructor function is designed to copy objects of the same class type ?
(A) Create constructor
(B) Object constructor
(C) Dynamic constructor
(D) Copy constructor
45. Which of the following statement is correct ?
(A) A constructor has the same name as the class in which it is present
(B) A constructor has a different name than the class in which it is present
(C) A constructor always returns an integer
(D) A constructor cannot be overloaded

Series-A BCA-2001 / K-363 Page - 11


46. A destructor takes _____________ arguments.
(A) One
(B) Two
(C) Three
(D) No
47. Destructor calls are made in which order of the corresponding constructor calls ?
(A) Reverse order
(B) Forward order
(C) Depends on how the object is constructe
(D) Depends on how many objects are constructed
48. Which allows you to create a derived class that inherits properties from more than
one base class ?
(A) Multilevel inheritance
(B) Multiple inheritance
(C) Hybrid inheritance
(D) Hierarchical inheritance
49. A derived class with only one base class :
(A) Multilevel inheritance
(B) Multiple inheritance
(C) Single inheritance
(D) Hierarchical inheritance
50. The duplication of inherited members due to the multiple paths can be avoided by
making a common base class is called :
(A) Abstract class
(B) Virtual base class
(C) Multiple inheritance
(D) Nesting of classes

Series-A BCA-2001 / K-363 Page - 12


51. The operators can’t be overloaded :
(A) Binary operators
(B) Unary operators
(C) Ternary operator
(D) None
52. A friend function for unary operator overloading takes _____________ arguments.
(A) Zero
(B) One
(C) Two
(D) None
53. A friend function for binary operator overloading takes ____________ arguments.
(A) Zero
(B) One
(C) Two
(D) None
54. The variable that contains the address of constant or variable :
(A) Function
(B) Array
(C) Pointer
(D) Structure
55. The memory management operator in c++ :
(A) New & delete
(B) Malloc
(C) Calloc
(D) Free

Series-A BCA-2001 / K-363 Page - 13


56. The pointer refers to an object that has called the member function currently :
(A) This
(B) Address
(C) Virtual function
(D) None
57. The empty virtual function are called :
(A) Pure / do nothing
(B) Virtual table
(C) Polymorphism
(D) Virtual base class
58. A stream of byte that is the interface between IO and IO devices :
(A) Streams
(B) Class
(C) Object
(D) File
59. The class that derived from standard library ios contain input functions :
(A) Ios
(B) iostream
(C) istream
(D) ostream
60. The class that derived from standard library ios contain output functions :
(A) Ios
(B) iostream
(C) istream
(D) ostream

Series-A BCA-2001 / K-363 Page - 14


61. Which function is in the ostream class :
(A) get()
(B) read()
(C) write
(D) cin
62. Which function is in the istream class :
(A) get()
(B) put()
(C) write
(D) cout
63. The standard library inherited from istream & ostream :
(A) Ios
(B) iostream
(C) ifstream
(D) ofstream
64. The function used to receive one character at a time :
(A) get()
(B) put()
(C) getline()
(D) write()
65. The function used to display one character at a time :
(A) get()
(B) put()
(C) getline()
(D) write()

Series-A BCA-2001 / K-363 Page - 15


66. The function used to receive one line at a time :
(A) get()
(B) put()
(C) getline()
(D) write()
67. The function used to display one line at a time :
(A) get()
(B) put()
(C) getline()
(D) write()
68. __________ are the reserved words of the programming language.
(A) Tokens
(B) Literals
(C) Separators
(D) Keywords
69. __________ refer to the names of variables, functions, arrays, classes, etc.
(A) Identifiers
(B) Operators
(C) Punctuators
(D) Manipulators
70. Write the range of value of the data type ‘char’ :
(A) 0 to 128
(B) 0 to 255
(C) -255 to 255
(D) -128 to 127

Series-A BCA-2001 / K-363 Page - 16


71. A ____________ is the name of the storage location :
(A) Identifier
(B) Variable
(C) Keyword
(D) Token
72. Array indexing always starts with the number :
(A) 0
(B) 1
(C) 2
(D) \0
73. We declare a function with _____________ if it does not have any return type.
(A) Long
(B) Double
(C) Void
(D) Int
74. Which of the following is selection statement in C++ ?
(A) break
(B) goto
(C) exit
(D) switch
75. Which of the following is a correct comment ?
(A) */ Comments */
(B) ** Comment **
(C) /* Comment */
(D) { Comment }

Series-A BCA-2001 / K-363 Page - 17


76. To increase the value of c by one which of the following statement is wrong ?
(A) c++;
(B) c = c + 1;
(C) c + 1 => c;
(D) c + = 1
77. When following piece of code is executed, what happens ? b = 3; a = b++; ?
(A) A contains 3 and b contains 4
(B) A contains 4 and b contains 4
(C) A contains 4 and b contains 3
(D) A contains 3 and b contains 3
78. How many times is a do while loop guaranteed to loop ?
(A) 0
(B) Infinitely
(C) 1
(D) Variable
79. Which of the following is not a valid relational operator ?
(A) = =
(B) =>
(C) >=
(D) >=
80. Strings are character arrays. The last index of it contains the null-terminated
character :
(A) \n
(B) \t
(C) \0
(D) \1

Series-A BCA-2001 / K-363 Page - 18


81. What will be the values of x, m and n after the execution of the following
statements ?
Int x, m, n; m = 10; n = 15; x = ++m + n++;
(A) x=25, m=10, n=15
(B) x=26, m=11, n=16
(C) x=27, m=11, n=16
(D) x=27, m=10, n=15
82. Consider the following statements : int x = 22, y=15; x = (x>y) ? (x+y) : (x-y);
What will be the value of x after executing these statements ?
(A) 22
(B) 37
(C) 7
(D) Error. Cannot be executed
83. Which of the following keywords is used to control access to a class member ?
(A) Default
(B) Break
(C) Protected
(D) Asm
84. Which of the following means “The use of an object of one class in definition of
another class” ?
(A) Encapsulation
(B) Inheritance
(C) Composition
(D) Abstraction
85. A derived class is also called a ____________.
(A) Small class
(B) Subclass
(C) Noticeable class
(D) Big class

Series-A BCA-2001 / K-363 Page - 19


86. Which of these inheritances is shown in case we inherit some base class from
another class, then one of the classes derives it ?
(A) Single
(B) Multiple
(C) Multi-level
(D) Hierarchical
87. _________ is the universal handler class for exceptions.
(A) Maths
(B) Object
(C) Exceptions
(D) Errors
88. Conversion of data type is called :
(A) Self referencing
(B) Type casting
(C) Virtual function
(D) Abstract class
89. The function contain in the ios class to set width :
(A) width()
(B) precision()
(C) fill()
(D) setf()
90. The function contain in the class iomanip to set width :
(A) setw()
(B) set precision()
(C) set fill()
(D) setiosflags()

Series-A BCA-2001 / K-363 Page - 20


91. How many default constructors per class are possible ?
(A) Only one
(B) Two
(C) Three
(D) Unlimited
92. How many times a constructor is called in the life-time of an object ?
(A) Only once
(B) Twice
(C) Thrice
(D) Depends on the way of creation of object
93. The mechanism of deriving one base class with more than one derived classes :
(A) Multilevel inheritance
(B) Multiple inheritance
(C) Hybrid inheritance
(D) Hierarchical inheritance
94. Which of the following is not correct :
(A) Only existing operator can be overloaded
(B) The overloaded operator must have at least one operand
(C) We can change the basic meaning of the operator
(D) Overloaded operators follow the syntax rule of original operator
95. A member function for unary operator overloading takes ___________ arguments.
(A) Zero
(B) One
(C) Two
(D) None

Series-A BCA-2001 / K-363 Page - 21


96. Which of the following function / type of function cannot be overloaded ?
(A) Member function
(B) Static function
(C) Virtual function
(D) Both (B) and (C)
97. Copy constructor must receive its arguments by _____________.
(A) Either pass-by-value or pass-by-reference
(B) Only pass-by-value
(C) Only pass-by-reference
(D) Only pass by address
98. The break statement causes an exit :
(A) From the innermost loop only
(B) Only from the innermost switch
(C) From all loops & switches
(D) From the innermost loop or switch
99. The arrays of variable that are of the type class :
(A) Array of object
(B) Pointer
(C) Object
(D) Structure
100. Which of the following type of data member can be shared by all instances of its
class ?
(A) Public
(B) Inherited
(C) Static
(D) Friend

******

Series-A BCA-2001 / K-363 Page - 22


Rough Work / jQ dk;Z

Series-A BCA-2001 / K-363 Page - 23


DO NOT OPEN THE QUESTION BOOKLET UNTIL ASKED TO DO SO

1. Examinee should enter his / her roll number, subject and Question Booklet
Series correctly in the O.M.R. sheet, the examinee will be responsible for
the error he / she has made.
2. This Question Booklet contains 100 questions, out of which only 75
Question are to be Answered by the examinee. Every question has 4
options and only one of them is correct. The answer which seems
correct to you, darken that option number in your Answer Booklet
(O.M.R ANSWER SHEET) completely with black or blue ball point
pen. If any examinee will mark more than one answer of a particular
question, then the answer will be marked as wrong.
3. Every question has same marks. Every question you attempt correctly,
marks will be given according to that.
4. Every answer should be marked only on Answer Booklet (O.M.R
ANSWER SHEET). Answer marked anywhere else other than the
determined place will not be considered valid.
5. Please read all the instructions carefully before attempting anything on
Answer Booklet (O.M.R ANSWER SHEET).
6. After completion of examination, please hand over the O.M.R. SHEET to
the Examiner before leaving the examination room.
7. There is no negative marking.
Note: On opening the question booklet, first check that all the pages of the
question booklet are printed properly in case there is an issue please ask the
examiner to change the booklet of same series and get another one.

Series-A BCA-2001 / K-363 Page - 24

You might also like