You are on page 1of 3

THE SET SCHOOL

REVISION WORKSHEET
CLASS X
CHAPTER 1,2,3
NAME:________________________ DATE_____________________

Delaration a pointer more than once may cause ____


A.Error
B.Abort
C.Trap
D.Null

Which one is not a correct variable type in C++?


A.float
B.real
C.int
D.double

Which operation is used as Logical 'AND'


A.Operator-&
B.Operator-||
C.Operator-&&
D.Operator +

An expression A.B in C++ means ____


A.A is member of object B
B.B is member of Object A
C.Product of A and B
D.None of these

A C++ code line ends with ___


A.A Semicolon (;)
B.A Fullstop(.)
C.A Comma (,)
D.A Slash (/)

In C++, a function contained within a class is called


(A) A method (C) Member function
(B) A class function (D) None of these
The break statement causes an exit
(A) From the innermost loop or switch (C) Only from the innermost loop
(B) Only from the innermost switch (D) From all loops and switches

In C++, which of the following can legitimately be passed to a function?


(A) A constant (C) A structure
(B) A variable (D) All of these

Which one of the following is not a fundamental data type in C++

float int
string wchar_t

Which of the following is a valid destructor of the class name “Country”

int ~Country() int ~Country(Country obj)


void Country() void ~Country()

What’s wrong? while( (i < 10) && (i > 24))

the logical operator && cannot be used in a test condition


the while loop is an exit-condition loop
the test condition is always false
the test condition is always true

What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);


the question mark should be an equal sign
the first semicolon should be a colon
there are too many variables in the statement
the conditional operator is only used with apstrings

What’s wrong? for (int k = 2, k <=12, k++)

the increment should always be ++k


the variable must always be the letter i when using a for loop
there should be a semicolon at the end of the statement
the commas should be semicolons

Which looping process checks the test condition at the end of the loop?

for
while
do-while
no looping process checks the test condition at the end
The default access level assigned to members of a class is ___________

Private Protected
Public Needs to be assigned

Which of the following correctly describes the meaning of‘namespace’ feature in C++?

Namespaces refer to the memory space allocated for names used in a program
Namespaces refer to space between the names in a program
Namespaces refer to packing structure of classes in a program.
Namespaces provide facilities for organizing the names in aprogram to avoid name clashes.

Which of the following languages is a subset of C++ language?

C language C# language
Java Language language

The statement i++; is equivalent to


i = i + i; i = i – 1;
i = i + 1; i –;

If there is more than one statement in the block of a for loop, which of the following must be
placed at the beginning and the ending of the loop block?
parentheses ( ) brackets [ ].
braces { } arrows < >

Which looping process is best used when the number of iterations is known?
for
while
do-while
all looping processes require that the iterations be known

Value of a in a = (b = 5, b + 5); is

Junk value 5
Syntax error 10

You might also like