Online Exam Preparation

MCQs Library

Browse subject-wise multiple choice questions, review answers quickly, and start a test from the same section.

Course Codes

Select a course to load its MCQs.

Selected: CS304 192 MCQs
CS101 533 CS201 225 CS301 232 CS302 174 CS304 192 CS401 224 CS402 258 CS403 228 CS408 113 CS411 121 CS502 249 CS504 268 CS601 679 CS604 381 CS605 261 CS607 184 CS609 230 CS610 300 CS614 100 CS703 65

Questions

Showing page 3 of 10

Code Question Option A Option B Option C Option D Answer
CS304
Class Abc{ ----- }; Is A Valid Class Declaration?
True
False
Na
Na
A
CS304
Class Is Not A Mechanism To Create Objects And Define User Data Types
True
False
Na
Na
B
CS304
Class X : Public A Public B { ... ... };
Single Inheritance
Multiple Inheritance
Double Inheritance
None Of The Given Options
B
CS304
Classes Like Twodimensionalshape And Threedimensionalshape Would Normally Be Concrete While Classes Like Sphere And Cube Would Normally Be Abstract
True
False
Na
Na
A
CS304
Classes Like Twodimensionalshape And Threedimensionalshape Would Normally Be Concrete While Classes Like Sphere And Cube Would Normally Be Abstract.
True
False
Na
Na
A
CS304
Compiler Performs __________ Type Checking To Diagnose Type Errors
Static
Dynamic
Bound
Unbound
A
CS304
Consider A Class Named Vehicle Which Of The Following Can Be The Instance Of Class Vehicle? 1. Car 2. Computer 3. Desk 4. Ahmed 5. Bicycle 6. Truck
1 4 5
2 5 6
1 2 3 6
1 5 6
C
CS304
Consider The Code Below Class Class1{ Private: Int I; }; Class Class2 : Protected Class1 { }; Then Int Member I Of Class1 Is In Class2
Public
Private
Protected
None Of The Given Options
C
CS304
Consider The Code Below Class Class1{ Protected: Int I; }; Class Class2 : Public Class1 { }; Then Int Member I Of Class1 Is In Class2
Public
Protected
Private
None Of The Given Options
B
CS304
Consider The Code Below Class Class1{ Protected: Int I; }; Class Class2 : Public Class1 { }; Then Int Member I Of Class1 Is In Class2
Public
Private
Protected
None Of The Given Options
A
CS304
Consider The Code Below Class Class1{ Public: Int I; }; Class Class2 : Public Class1 { }; Then Int Member I Of Class1 Is In Class2
Public
Protected
Private
None Of The Given Options
A
CS304
Consider The Code Below Class Class1{ Public: Void Func1(); }; Class Class2 : Protected Class1 { }; Function Func1 Of Class1 Is In Class2
Public
Protected
Private
None Of The Given Options
A
CS304
Consider The Code Below Class Fred { Public: Fred(); … }; Int Main() { Fred A[10]; Fred* P = New Fred[10]; … }
Fred A[10]; Calls The Default Constructor 09 Times Fred* P = New Fred[10]; Calls The Default Constructor 10 Times
Produce An Error
Fred A[10]; Calls The Default Constructor 11 Times Fred* P = New Fred[10]; Calls The Default Constructor 11 Times
Fred A[10]; Calls The Default Constructor 10 Times Fred* P = New Fred[10]; Calls The Default Constructor 10 Times
C
CS304
Consider The Following Statement Cupboard Has Books What Is The Relationship Between Cupboard And Books?
Composition
Aggregation
Inheritance
None Of The Given Options
B
CS304
Consider The Following Two Lines Of Code Written For A Class Student 1. Student Sobj1 Sobj2; 2. Sobj2 = Sobj1; In Line No.2 What Constructor Of Student Class Will Be Called
Default Constructor Of Student Class
Copy Constructor Of Student Class
Both Default And Copy Constructer Of Student Class
No Constructor Will Be Called
A
CS304
Consider The Statement -Room Has Chair? Which Of The Following Type Of Association Exists Between Room And Chair?
Inheritance
Composition
There Is No Association
Aggregation
D
CS304
Considering The Resolution Order In Which Considering The Resolution Order In Which Compiler Search For Functions In A Program; The First Priority Is Given To; The First Priority Is Given To
General Template
Partial Specialization
Complete Specialization
Ordinary Function
D
CS304
Constant Objects Cannot Change Their State
True
False
Na
Na
A
CS304
Constructor Have Same Name As The Class Name
True
False
Na
Na
A
CS304
Data Items In A Class Must Be Private
True
False
Na
Na
B