wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

TECHNOSTORM 2K22 R1 ( BATCH 4 )

Total questions: 30

Worksheet time: 6mins

Name
Class
Date
1.

The statement char ch = ‘Z’ would store in ch

a)

(1) The character Z

b)

(2) ASCII value of Z

c)

(3) Z along with the single inverted commas

d)

(4) Both (1) and (2)

2.

The maximum value that an integer constant can have is ...........

a)

a. -32767

b)

b. 32767

c)

c. 1.7014e+38

d)

d. -1.7014e+38

3.

Which of the following statement is wrong ?

a)

mes = 123.56;

b)

con= 'T' * 'A';

c)

this = 'T' * 20;

d)

3+a=b;

4.

If 'a' is an integer variable , a = 5/2; will return a value:

a)

a. 2.5

b)

b. 2

c)

c. 3

d)

d. 0

5.

Local variables are also called as ..............

a)

a. Global

b)

b. External

c)

c. Scope

d)

d. Automatic

6.

............. variables are permanent variables within their own function or life .

a)

a. Auto

b)

b. Static

c)

c. Extern

d)

d. Register

7.

If an array is used as function argument , the array is passed

a)

a. by value

b)

b. by reference

c)

c. by name

d)

d. the array cannot be used as a function argument

8.

The ............... function will sort any type of array.

a)

(A) tab()            

b)

(B) tab out()

c)

(C) sort() 

d)

(D) bubble()

9.

The specification of the number 100 as long int is .............

a)

(A) L100         

b)

(B) 100         

c)

(A) 100L     

d)

(A) 100l        

10.

Which of the following is FALSE in C :

a)

(A) Keywords can be used as variable names

b)

(B) Variable names can contain a digit

c)

(C) Variable names do not contain a blank space

d)

(D) Capital letters can be used in variable names

11.

How many times the following loop be executed

{

ch = ‘b’;

while(ch >= ‘a’ && ch <= ‘z’)

ch++;

}

a)

(A) 0

b)

(B) 25

c)

(C) 26

d)

(D) 1

12.

The keyword ................ is used to declare a generic function.

(A) generic        (B) template

(C) virtual          (D) friend

a)

(A) generic 

b)

(B) template

c)

(C) virtual  

d)

(D) friend

13.

  C++ begins its execution with ................

a)

(A) header file

b)

(B) main

c)

(C) class  

d)

(D) declaration

14.

The ............... term refers to the value that is used to call a function.

a)

(A) parameter  

b)

(B) argument

c)

(C) variable 

d)

   (D) pointer

15.

What would be returned by the following recursive function after we call test (0, 3)

int test (int a, int b)

{

if (a==b) return (1);

else if (a>b) return(0);

else return (a+test(a+1, b));

}

a)

(A) 1

b)

(B) 2

c)

(C) 3

d)

(D) 4

16.

The size of array int a[5]={1,2} is

a)

(A) 4

b)

(B) 12

c)

(C) 10

d)

(D) 6

17.

Recursion is sometimes called ..................

a)

(A) Circular definition

b)

(B) Complex definition

c)

(C) Procedure      

d)

  (D) Union

18.

>> is called as ............. operator.

a)

(A) Insertion

b)

(B) Extraction

c)

(C) Greater than

d)

(D) Lesser than

19.

The ................ operation returns the remains of a divisions operation .

a)

(A) .!

b)

(B) &&

c)

(C) %

d)

(D) /

20.

The declaration of a two dimensional array called list with dimensions 4 X 9 is represented as ..................

a)

(A) int list [4] [9]

b)

(B) int list [9][4]

c)

(C) int list [4,9]  

d)

(D) int list[9,4]

21.

The content of file will be lost if it is opened in

a)

(A) w mode    

b)

(B) w+ mode

c)

(C) a mode

d)

(D) a+ mode

22.

The name of all functions end with a

a)

(A) pair of parenthesis

b)

(B) semicolon

c)

(C) braces   

d)

      (D) colon

23.

The built-in library function ceil(x) requires the ................... header file.

a)

(A) <ctype.h>

b)

(B) <math.h>

c)

(C) <stdlib.h>

d)

(D) <time.h>

24.

Which type of data file is analogous to an audio cassette tape?

a)

(A) random access file

b)

(B) sequential access file

c)

(C) binary file

d)

(D) source code file

25.

The value of an automatic variable that is declared but not initialised will be

a)

(A) 0 

b)

(B) -1

c)

(C) unpredictable 

d)

(D) none of these

26.

Which of the following declarations are illegal?

a)

(A) void *ptr; 

b)

(B) char *str = “hello”;

c)

(C) char str = “hello”; 

d)

(D) const *int p1;

27.

   The address of a variable temp of type float is

a)

(A) *temp

b)

(B) &temp

c)

(C) float& temp 

d)

(D) float temp&

28.

Within a switch statement

a)

(A) Continue can be used but Break cannot be used

b)

(B) Both Continue and Break can be used

c)

(C) Continue cannot be used but Break can be used

d)

(D) Neither Continue nor Break can be used

29.

How many constructors can a class have?

a)

(A) 0 

b)

(B) 1

c)

(C) 2 

d)

(D) any number

30.

What will be the result of the expression 13 & 25?

a)

(A) 38

b)

(B) 25

c)

(C) 9 

d)

(D) 12