Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations

WB JECA MCA Previous Year Questions (PYQs)

WB JECA MCA Object Oriented Programming OOPs PYQ


WB JECA MCA PYQ
How many parameters does a default constructor require ? 
(A) 1
(B) 2 
(C) 0
(D) 3





Go to Discussion

WB JECA MCA Previous Year PYQ WB JECA MCA JECA MCA 2024 PYQ

Solution

  • A default constructor in C++ is a constructor that takes no arguments.
  • It is invoked automatically when an object is created without passing parameters.
Hence, it requires 0 parameters.

Correct Answer: (C) 0

WB JECA MCA PYQ
The keyword friend does not appear in
(A) the class allowing access to another class.
(B) the class desiring access to another class.
(C) the private section of a class.
(D) the public section of a class.





Go to Discussion

WB JECA MCA Previous Year PYQ WB JECA MCA JECA MCA 2024 PYQ

Solution

  • The friend keyword is used inside a class definition to allow another class or function to access its private/protected members.
  • It appears in the class granting access (not the one desiring access).
  • It can be declared in either public or private section of that class.
Hence, it does not appear in the class desiring access.

Correct Answer: (B) the class desiring access to another class

WB JECA MCA PYQ
Which among the following can’t be used for polymorphism?





Go to Discussion

WB JECA MCA Previous Year PYQ WB JECA MCA JECA MCA 2024 PYQ

Solution

Solution: Static member functions cannot be virtual; hence they don’t participate in runtime polymorphism. Overloading (functions/operators/constructors) supports polymorphism.
Answer: (A) Static member functions

WB JECA MCA PYQ
If a file has read and write permission for the owner, then the octal representation of the permissions will be:





Go to Discussion

WB JECA MCA Previous Year PYQ WB JECA MCA JECA MCA 2024 PYQ

Solution

Solution: Read=4, Write=2 ⇒ total = 6.
Answer: (C) 6

WB JECA MCA PYQ
Identify the incorrect constructor type:





Go to Discussion

WB JECA MCA Previous Year PYQ WB JECA MCA JECA MCA 2024 PYQ

Solution

Solution: In C++, there is no concept of Friend Constructor. Others exist.
Answer: (A) Friend Constructor

WB JECA MCA PYQ
Making class members inaccessible to nonmember functions is an example of:





Go to Discussion

WB JECA MCA Previous Year PYQ WB JECA MCA JECA MCA 2024 PYQ

Solution

Solution: Restricting access to internal details of a class is data hiding (encapsulation).
Answer: (B) data hiding

WB JECA MCA PYQ
Which is the correct statement about operator overloading ?





Go to Discussion

WB JECA MCA Previous Year PYQ WB JECA MCA JECA MCA 2024 PYQ

Solution

Solution: Overloading changes operator meaning for user types, but its precedence and associativity never change.
Answer: (D)


WB JECA MCA


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

WB JECA MCA


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...