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

Bca2001 Set A

Uploaded by

shivam8565shukla
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)
43 views

Bca2001 Set A

Uploaded by

shivam8565shukla
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/ 16

Roll No. ....................................

Question Booklet Number

O. M. R. Serial No.

B. C. A. (Second Semester) EXAMINATION, 2022-23


OBJECT ORIENTED PROGRAMMING USING C++
Questions Booklet
Paper Code Series

B C A 2 0 0 1 A
Time : 1:30 Hours ] [ Maximum Marks : 75

Instructions to the Examinee : ijh{kkfFkZ;ksa ds fy, funsZ’k %

1. Do not open the booklet unless you are 1. iz’u&iqfLrdk dks rc rd u [kksyas tc rd vkils dgk
asked to do so. u tk,A

2. The booklet contains 100 questions. 2. iz’u&iqfLrdk esa 100 iz’u gSaA ijh{kkFkhZ dks 75 iz’uksa
Examinee is required to answer 75 dks dsoy nh xbZ OMR vkUlj&’khV ij gh gy djuk
questions in the OMR Answer-Sheet
gS iz’u&iqfLrdk ij ughaA lHkh iz’uksa ds vad leku
provided and not in the question booklet.
All questions carry equal marks. gSaA

3. Examine the Booklet and the OMR Answer- 3. iz’uksa ds mŸkj vafdr djus ls iwoZ iz’u&iqfLrdk rFkk
Sheet very carefully before you proceed. OMR vkUlj&’khV dks lko/kkuhiwod
Z ns[k ysAa nks”kiw.kZ
Faulty question booklet due to missing or
iz’u&iqfLrdk ftlesa dqN Hkkx Nius ls NwV x, gksa ;k
duplicate pages/questions or having any
iz’u ,d ls vf/kd ckj Ni x, gksa ;k mlesa fdlh
other discrepancy should be got
immediately replaced. vU; izdkj dh deh gks rks mls rqjUr cny ysAa

(Remaining instructions on the last page) ¼’ks”k funs’Z k vfUre i`”B ij½
(Only for Rough Work)

(Remaining instructions on the last page) ¼’ks”k funs’Z k vfUre i`”B ij½
1. C++ language was developed by ........... . 5. C++ follows ............ .

(A) Dennis Rechard (A) Top-down Design Approach

(B) Dennis M. Ritchie (B) Bottom-up Design Approach


(C) Bjarne Stroustrup
(C) Both of the above
(D) Anders Hejlsberg
(D) None of the above.

2. In which year, the name of the language


6. C++ is a ............ .
was changed from “C with Classes” to
(A) High-level language
C++ ?
(B) Medium level language
(A) 1979

(B) 1972 (C) Low-level language

(C) 1983 (D) None of the above

(D) 1986
7. How many keywords are there in C++ ?

3. C++ language is a successor to which (A) 32


language ?
(B) 48
(A) B
(C) 99
(B) C
(D) 95
(C) Java

(D) VB 8. Which of the following is not a valid

keyword in C++ language ?


4. C++ language is a ............ .
(A) while
(A) Object Oriented Language

(B) Procedural Oriented Language (B) for

(C) Structural Oriented Language (C) switch

(D) None of the above (D) do---while

BCA–2001 (3) Set-A


9. Which of the following statements is 12. Which of the following is the correct
correct about identifiers in C++ ? extension of the C++ source code file ?

(A) Identifiers are the combination of (A) .cpp


alphanumeric characters that can (B) .c++
be used for function and variable (C) Both of the above
names. (D) None of the above
(B) Identifiers are a combination of
13. C++ is a pure object-oriented language.
alphanumeric characters that can
(A) True
be used for looping statements.
(B) False
(C) Both of the above
(D) None of the above 14. Which of the following OOPs concepts
are supported in C++ ?
10. Which of the following languages
(1) Inheritance
translators is used in C++ ?
(2) Encapsulation
(A) Assembler
(3) Abstraction
(B) Interpreter
(4) Polymorphism
(C) Compiler
Options :
(D) Both Interpreter and Compiler
(A) l and 2

11. Which of the following whitespace (B) 1, 2 and 3


characters can be used in C++ ? (C) 1, 2 and 4

(1) Horizontal tab (D) All 1, 2, 3, 4

(2) Vertical tab 15. OOPs stands for :


(3) Form feed (A) Object Oriented Process System
(4) New line (B) Object Oriented Programming
Options : System
(A) l and 2 (C) Object Oriented Programming
(B) 3 and 4 Service
(C) 1, 3 and 4 (D) Object Orientation Programming
(D) All 1, 2, 3, 4 System

BCA–2001 (4) Set-A


16. Is it true, C++ is a superset of C 21. Which of the following is an insertion

language ? operator in C++ ?

(A) <<
(A) True
(B) >>
(B) False
(C) –>
17. C++ is a more secure programming (D) <<<
language compared to C language.
22. Which of the following is an extraction
(A) True operator in C++ ?

(B) False (A) >>>


(B) >>
18. Which of the following header file is
(C) –>
used to define cin cout ?
(D) <<<
(A) <iomanip.h>
23. The endl is a ............ .
(B) <iostream.h>
(A) macro
(C) <fstream.h>
(B) object
(D) None of the above (C) pointers
(D) function
19. The cin, cout are ............ .

(A) library functions 24. Which of the following are types of data
types in C++ ?
(B) structures
(1) Basic Data type
(C) pointers
(2) Derived Data type
(D) objects
(3) Enumeration Data type

20. The stdout stands for ............ . (4) User Defined Data type
Options :
(A) State Output
(A) l and 2
(B) Standard Output
(B) 1, 2 and 4
(C) Stand Output
(C) 1, 2 and 3
(D) Stream Output (D) All 1, 2, 3, 4

BCA–2001 (5) Set-A


25. The size of basic datatypes can be 29. For which type, the format specifier “%i”

changed according to 32 or 64-bit is used ?

operating systems. (A) int

(A) True (B) float

(B) False (C) array

(D) char
26. Which of the following is the correct

format specifier for long double-type 30. Which of the following is not a correct

values in C++ ? qualifier in C++ ?

(A) Size qualifier


(A) %f
(B) Type qualifier
(B) %ld
(C) Sign qualifier
(C) %lf
(D) None of the above
(D) %ldf

31. How many byte(s) does a short type take


27. Is C++ language supports both signed
in C++ ?
and unsigned literals ?
(A) 1
(A) True
(B) 2
(B) False
(C) 3

28. Which of the following is not the basic (D) 4

type in C++ ?
32. The operator „+‟ is :
(A) int
(A) Unary Operator
(B) float
(B) Binary Operator
(C) array
(C) Both Unary and Binary Operator
(D) char (D) None of the above

BCA–2001 (6) Set-A


33. The operator „%‟ is known as : 37. The sizeof() is a :

(A) Division Operator (A) Unary Operator

(B) Modulus Operator (B) Binary Operator

(C) Percentage Operator (C) Ternary Operator

(D) None of the above (D) None of the above

34. Which of the following operators is a 38. Which of the following operators is used

ternary operator ? to return the address of a variable ?

(A) += (A) *

(B) != (B) –>

(C) :: (C) &

(D) ?: (D) None of the above

35. Which of the following operators is 39. Which of the following is known as the

known as Scope Resolution Operator ? “value of” operator ?

(A) :: (A) *

(B) ?: (B) –>

(C) –> (C) &

(D) . (D) None of the above

36. Which of the following operators is 40. Which of the following is known as the

known as Referential Operator ? “NOT” operator ?

(A) != (A) ~

(B) ?: (B) !

(C) –> (C) NOT

(D) sizeof (D) None of the above

BCA–2001 (7) Set-A


41. Which of the following is not an 44. Which of the following is/are a decision-

arithmetic operator ? making statement ?

(A) % (1) IF statement

(B) / (2) Switch statement

(C) ! (3) Conditional operators

(D) * (4) None ofthe above

Options :
42. Which of the following statements is
(A) l and 2
correct about the global variable ?
(B) l and 3
(A) A variable defined inside the
(C) Only 4
function or block is known as a
(D) 1, 2 and 3
global variable.

(B) A variable defined outside the 45. Which of the following statements can

function or block is known as a replace the if-else statement ?

global variable. (A) while loop

(C) Global variables can only declare (B) do---while loop

inside the “.h” file. (C) for loop

(D) None of the above (D) conditional operator

43. Which of the following is the default 46. Which of the following is an exit control

storage class in C++ ? loop ?

(A) auto (A) While loop

(B) extern (B) Do---while loop

(C) register (C) For loop

(D) static (D) None of the above

BCA–2001 (8) Set-A


47. Which of the following loops is normally 51. How many minimum numbers of
used for a menu-driven program ? functions are required to execute a C++
(A) Do---while loop program ?
(B) For loop
(A) 1
(C) While loop
(B) 2
(D) None of the above
(C) 3
48. Which of the following loops is the best
option when the number of iterations is (D) 4

known ?
52. What is the lifetime of a static variable
(A) While loop
declared in a user-defined function ?
(B) For loop

(C) Do---while loop (A) Within the function only

(D) All loops require that the iterations (B) Within the main function only
be known
(C) Whole program

49. Execution of C++ program starts from : (D) None of the above
(A) void function
53. Which of the following statements is
(B) class

(C) main function correct about inline function ?

(D) user-defined function (A) A function that is substituted at the

50. Which of the following is a more place of call.

effective way to call a function with (B) A function that is called at compile
arguments ?
time
(A) Call by value
(C) A function that contains only
(B) Call by reference
looping statements
(C) Call by address

(D) None of the above (D) None of the above

BCA–2001 (9) Set-A


54. Default values for a function are 58. Can we create an array of objects

defined : in C++ ?

(A) Yes
(A) In function declaration
(B) No
(B) In function definition
59. An array occupies memory space in :
(C) During function call
(A) Contiguous manner
(D) None of the above
(B) Fragmented manner

55. Index of an array starts from : (C) Linked list


(D) None of the above
(A) l

(B) 2 60. How many dimensions are an array


in C++ ?
(C) 0
(A) 1D array
(D) –1
(B) 2D array

56. In C++, the array name denotes : (C) 3D array


(D) No limit
(A) The base address of the array

(B) The first value of the array 61. When we pass an array to the function,
then the function call will be :
(C) Last value of the array
(A) Call by value
(D) None of the above
(B) Call by reference

57. If we create an array “Arr”, which is the (C) Both (A) and (B)
(D) None of the above
correct way to access the first element of

the array ? 62. Which of the following operators is


known as the indirection operator ?
(A) Arr[0]
(A) –>
(B) 0[Arr]
(B) &
(C) *(Arr+0) (C) *
(D) All of the above (D) None of the above

BCA–2001 ( 10 ) Set-A
63. Which of the following is the incorrect 67. Which of the following can point to any

way to declare a pointer ? type of variable ?

(A) int *ptr; (A) Far pointer

(B) int* ptr; (B) Null pointer

(C) int &ptr; (C) Void pointer

(D) int *ptr=0; (D) Dangling pointer

64. A pointer can be initialized with : 68. Which type of memory is allocated using

(A) Address of variable of the same dynamic memory allocation ?

type (A) Stack

(B) NULL (B) Heap

(C) 0 (C) Static

(D) All of the above (D) Program code

65. Which of the following is the correct way 69. Which of the following is/are used for

to get value from pointer “ptr” ? dynamic memory allocation ?

(A) ptr (1) malloc

(B) &ptr (2) calloc

(C) *ptr (3) new

(D) All of the above (4) free

66. What is the size of a pointer ? Options :

(A) 4 bytes (A) l and 2

(B) 8 bytes (B) 1, 2 and 4

(C) 16 bytes (C) 2 and 3

(D) Vary from processor to processor (D) All 1, 2, 3 and 4

BCA–2001 ( 11 ) Set-A
70. Can we allocate memory for an object 74. Which of the following statements is

dynamically ? correct about class in C++ ?

(A) Yes (A) Class is an instance that contains

(B) No data member and member

functions.
71. Which of the following operators is used
(B) Class is fundamental that contains
to release dynamically allocated memory
data member and member
space ?
functions.
(A) new
(C) Class is a blueprint for a data type
(B) remove
that encapsulates data member and
(C) release
member functions.
(D) delete
(D) None of the above

72. The “delete” is an operator in C++.


75. By default, members of a class are :
(A) Yes
(A) Public
(B) No (B) Private

73. Which of the following is a valid way to (C) Protected

allocate dynamic memory for an integer (D) None of the above

variable ? 76. What is the size of an empty class

(A) int *ptr = new int(111); in C++ ?

(B) int *ptr = NULL;ptr = new int; (A) 1 byte

*ptr=111; (B) 0 byte

(C) int *ptr;ptr = new int; *ptr=l 11; (C) 2 byte

(D) All of the above (D) 4 byte

BCA–2001 ( 12 ) Set-A
77. Can we create multiple objects of a class 81. Which of the following statements is

in C++ ? correct about constructors in C++ ?

(A) A constructor is used to destroy an


(A) Yes
object.
(B) No
(B) Constructor is used to initializing
78. Which of the following operators is used data members when an object gets

to access the members using the object of created.


(C) Constructor is used to call the
a class ?
private function from outside the
(A) .
class.
(B) –> (D) None of the above
(C) :
82. How many parameters can be accepted
(D) None of the above by a default constructor ?

(A) 1
79. Which of the following operators is used
(B) 2
to access the members using the pointer
(C) 0
to the object of a class ?
(D) Infinite
(A) .
83. What is the return type of a constructor ?
(B) –>
(A) void
(C) :
(B) mt
(D) None of the above (C) float
(D) None of the above
80. How many types of specifiers can be

used in class in C++ ? 84. Which of the following is an incorrect


type of constructor in C++ ?
(A) 1
(A) Copy constructor
(B) 2
(B) Move constructor
(C) 3
(C) Default constructor
(D) 4 (D) Parameterized constructor

BCA–2001 ( 13 ) Set-A
85. If we did not create any constructor in 89. To overcome the ambiguity occurred due
the class, then which of the following to multipath inheritance, C++ provides
constructors is automatically added to the the keyword ............ .
class ?
(A) virtual
(A) Copy constructor (B) friend
(B) Default constructor (C) default
(C) Parameterized constructor (D) None of the above
(D) None of the above
90. The procedure of creating a new class
86. Constructor and Destructor have the from one or more existing classes is
same name but destructor is preceded
termed as ............ .
by :
(A) Inheritance
(A) ~
(B) Polymorphism
(B) !
(C) Encapsulation
(C) $
(D) None of the above
(D) #
91. The combination of one or more types of
87. Which of the following constructors is
inheritance ............ .
used to create an object by initializing
(A) Single
data members using an existing object ?
(B) Hybrid
(A) Default constructor
(C) Multilevel
(B) Dynamic constructor
(D) None of the above
(C) Copy constructor
(D) None of the above 92. Which of the following is the other name

of compile-time polymorphism ?
88. When does a destructor gets called ?
(A) Static polymorphism
(A) When an object gets created

(B) When an object gets destroyed (B) Executing polymorphism

(C) After calling constructor (C) Dynamic polymorphism

(D) None of the above (D) Non-executing polymorphism

BCA–2001 ( 14 ) Set-A
93. A file stream refers to the flow of data 97. Which function return the current

between a ............ . position of the get or put pointer in


bytes ?
(A) Program and stream
(A) tellg()
(B) Program and object
(B) tellp()
(C) Program and file
(C) tell()
(D) None of the above (D) Both (A) and (B)

94. When an exception is thrown, it needs to 98. A pure virtual function is a virtual

be ............ . function that ............ .

(A) has nobody


(A) Executed
(B) returns nothing
(B) Handled appropriately
(C) is used in the base class
(C) Resolved (D) Both (A) and (C)
(D) None of the above
99. ............ means that the code associated

95. C++ exception handling mechanism with a given procedure call is not known
until the time of the call at runtime.
mainly uses how many keywords ?
(A) Dynamic binding
(A) Four
(B) Runtime binding
(B) Three
(C) Early binding
(C) Two (D) Static binding

(D) None of the above


100. Through ............, we can eliminate

96. In C++ ............ operator is used for redundant code and extend the use of

dynamic memory allocation. existing classes.

(A) Scope resolution (A) Encapsulation

(B) Conditional (B) Polymorphism


(C) New (C) Inheritance
(D) Membership access (D) Overloading

BCA–2001 ( 15 ) Set-A
4. Four alternative answers are mentioned for 4. iz’u&iqfLrdk esa izR;sd iz’u ds pkj lEHkkfor mŸkj
each question as—A, B, C & D in the booklet. A, B, C ,oa D gSaA ijh{kkFkhZ dks mu pkjksa fodYiksa esa ls
The candidate has to choose the correct
answer and mark the same in the OMR
lgh mŸkj Nk¡Vuk gSA mŸkj dks OMR vkUlj&’khV esa
Answer-Sheet as per the direction : lEcfU/kr iz’u la[;k esa fuEu izdkj Hkjuk gS %
Example : mnkgj.k %
Question : iz’u %
Q. 1 iz’u 1
Q. 2 iz’u 2
Q. 3 iz’u 3
Illegible answers with cutting and viBuh; mŸkj ;k ,sls mŸkj ftUgsa dkVk ;k cnyk x;k
over-writing or half filled circle will be gS ;k xksys esa vk/kk Hkjdj fn;k x;k mUgsa fujLr dj
cancelled.
fn;k tk,xkA
5. Each question carries equal marks. Marks 5. izR;sd iz’u ds vad leku gSaA vkids ftrus mŸkj
will be awarded according to the number of lgh gksxa ]s mUgha ds vuqlkj vad iznku fd;s tk;saxAs
correct answers you have.
6. All answers are to be given on OMR Answer 6. lHkh mŸkj dsoy vks- ,e- vkj- mŸkj&i=d (OMR
sheet only. Answers given anywhere other Answer Sheet) ij gh fn;s tkus gSaA mŸkj&i=d esa
than the place specified in the answer sheet fu/kkZfjr LFkku ds vykok vU;= dgha ij fn;k x;k
will not be considered valid.
mŸkj ekU; ugha gksxkA
7. Before writing anything on the OMR Answer 7. vks- ,e- vkj- mŸkj&i=d (OMR Answer Sheet) ij
Sheet, all the instructions given in it should dqN Hkh fy[kus ls iwoZ mlesa fn;s x;s lHkh vuqns’kksa dks
be read carefully. lko/kkuhiwoZd i<+ fy;k tk;sA
8. After the completion of the examination 8. ijh{kk lekfIr ds mijkUr ijh{kkFkhZ d{k fujh{kd dks
candidates should leave the examination hall viuh OMR Answer Sheet miyC/k djkus ds ckn
only after providing their OMR Answer gh ijh{kk d{k ls izLFkku djsaA ijh{kkFkhZ vius lkFk
Sheet to the invigilator. Candidate can carry
their Question Booklet.
iz’u&iqfLrdk ys tk ldrs gSaA
9. There will be no negative marking. 9. fuxsfVo ekfd±x ugha gSA
10. Rough work, if any, should be done on the 10. dksbZ Hkh jQ dk;Z iz’u&iqfLrdk ds vUr esa jQ&dk;Z
blank pages provided for the purpose in the
booklet.
ds fy, fn, [kkyh ist ij gh fd;k tkuk pkfg,A
11. To bring and use of log-book, calculator, 11. ijh{kk&d{k esa ykWx&cqd] dSydqysVj] istj rFkk lsY;qyj
pager and cellular phone in examination hall Qksu ys tkuk rFkk mldk mi;ksx djuk oftZr gSA
is prohibited.
12. In case of any difference found in English 12. iz’u ds fgUnh ,oa vaxszth :ikUrj.k esa fHkUurk gksus dh
and Hindi version of the question, the n’kk esa iz’u dk vaxst
z h :ikUrj.k gh ekU; gksxkA
English version of the question will be held
authentic.
Impt. : On opening the question booklet, first egRoiw.kZ % iz’uiqfLrdk [kksyus ij izFker% tk¡p dj ns[k ysa
check that all the pages of the question fd iz’u&iqfLrdk ds lHkh i`”B HkyhHkk¡fr Nis gq, gSaA
booklet are printed properly. If there is ny ;fn iz’uiqfLrdk esa dksbZ deh gks] rks d{kfujh{kd dks
discrepancy in the question Booklet, then
after showing it to the invigilator, get
fn[kkdj mlh fljht dh nwljh iz’u&iqfLrdk izkIr
another question Booklet of the same series. dj ysaA

You might also like