Online Computer Science Test - Object Oriented Programming Test 3



Loading...  Loading Test...

Instruction:

  • This is a FREE online test. DO NOT pay money to anyone to attend this test.
  • Total number of questions : 20.
  • Time alloted : 30 minutes.
  • Each question carry 1 mark, no negative marks.
  • DO NOT refresh the page.
  • All the best :-).


1.

Evaluate the following expression: 3 >6&&7>4

A.
True
B.
False

Your Answer: Option (Not Answered)

Correct Answer: Option B

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


2.

A normal C++ operator that acts in special ways on newly defined data types is said to be

A.
glorified
B.
encapsulated
C.
classified
D.
overloaded

Your Answer: Option (Not Answered)

Correct Answer: Option D

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


3.

If you want only one memory location to be reserved for a class variable, no matter how many objects are instantiated, you should declare the variable as

A.
static
B.
unary
C.
dynamic
D.
volatile

Your Answer: Option (Not Answered)

Correct Answer: Option A

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


4.

Functions that returns information about an object's state can be classified as ________

A.
inspector functions
B.
mutator functions
C.
auxiliary functions
D.
manager functions

Your Answer: Option (Not Answered)

Correct Answer: Option A

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


5.

Using new may result in less _____ memory than using an array

A.
wasted
B.
used
C.
RAM
D.
ROM

Your Answer: Option (Not Answered)

Correct Answer: Option A

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


6.

Which of the following is a C++ class?

A.
>>
B.
read()
C.
cin
D.
iostream

Your Answer: Option (Not Answered)

Correct Answer: Option D

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


7.

Which of the following, if any, are invalid names for a variable?

A.
bankAccountNumber
B.
first_Name
C.
doubleNumber
D.
operator
E.
All of the above are valid names for variables

Your Answer: Option (Not Answered)

Correct Answer: Option D

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


8.

To create a template class, you begin with _________

A.
the template definition
B.
the keyword class
C.
the function definitions
D.
the keyword definition

Your Answer: Option (Not Answered)

Correct Answer: Option A

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


9.

In the C language, the character type of constant is delimited by using

A.
single quotes
B.
double quotes
C.
parenthesis
D.
#
E.
None of the above

Your Answer: Option (Not Answered)

Correct Answer: Option A

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


10.

An exception specification begins with the keyword _____

A.
exception
B.
try
C.
throw
D.
catch

Your Answer: Option (Not Answered)

Correct Answer: Option C

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


11.

One of the logical operators in the C language is represented by the symbol

A.
AND
B.
&&
C.
>=
D.
<=
E.
None of the above

Your Answer: Option (Not Answered)

Correct Answer: Option B

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


12.

In C++, the address operator is the following symbol _____

A.
>>
B.
&
C.
*
D.
!

Your Answer: Option (Not Answered)

Correct Answer: Option B

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


13.

Which of the following is true?

A.
iostream is derived from istream
B.
iostream is derived from ostream
C.
ostream is derived from iostream
D.
ostream is derived from istream

Your Answer: Option (Not Answered)

Correct Answer: Option C

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


14.

Which is true?

A.
Coincidental cohesion is stronger than procedural cohesion
B.
Logical cohesion is stronger than coincidental cohesion
C.
Sequential cohesion is weaker than temporal cohesion
D.
The weakest cohesion is functional

Your Answer: Option (Not Answered)

Correct Answer: Option B

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


15.

A pointer is

A.
the address of a variable
B.
an indication of the variable to be accessed next
C.
a variable for storing addresses
D.
the data type of an address variable

Your Answer: Option (Not Answered)

Correct Answer: Option C

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


16.

Programmers prefer to declare almost all variables _____

A.
at the beginning of each function
B.
globally
C.
on one line
D.
with cryptic names

Your Answer: Option (Not Answered)

Correct Answer: Option A

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


17.

The main difference in operation between an 'if statement and a 'while' statement is

A.
the 'while' loop body is executed
B.
the body of the 'while' statement may be executed many times, the body of the 'if statements only once
C.
the conditional expression following the keyboard is evaluated differently
D.
All of the above
E.
None of the above

Your Answer: Option (Not Answered)

Correct Answer: Option B

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


18.

The 'break' statement is used to exist from

A.
a do loop
B.
a for loop
C.
a switch statement
D.
All of the above
E.
None of the above

Your Answer: Option (Not Answered)

Correct Answer: Option D

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


19.

A function's single most important role is to

A.
give a name to a block of code
B.
reduce program size
C.
accept arguments and provide a return value
D.
help organize a program into conceptual units
E.
None of the above

Your Answer: Option (Not Answered)

Correct Answer: Option D

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


20.

Which of the following creates a String named constant called partNo, whose value is AB45?

A.
const char[4] partNo = "AB45";
B.
const char[5] partNo = 'AB45';
C.
const char[5] partNo = "AB45";
D.
const char partNo[5] = "AB45";
E.
None of the above

Your Answer: Option (Not Answered)

Correct Answer: Option D

Learn more problems on : Object Oriented Programming Using C++

Discuss about this problem : Discuss in Forum


Submit your test now to view the Results and Statistics with answer explanation.