wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz on Air Pool 1 SH

Total questions: 21

Worksheet time: 17mins

Name
Class
Date
1.

How do we store a negative integer?

a)

One's Compliment

b)

Two's Compliment

c)

Zero's Compliment

d)

None of the above

2.

What will happen to the program in the absence of a main()?

a)

Compilation Error

b)

Syntax Error

c)

No Error. Program will not be executed

d)

Program will execute normally

3.

Which of the following best defines a class?

a)

Parent of an object

b)

Instance of an object

c)

Scope of an object

d)

Blueprint of an object

4.

Which header file is required in C++ to use OOP?

a)

iostream.h

b)

No Header File Needed

c)

stdio.h

d)

stdlib.h

5.

In C++, a collection of generic class and function is called as

a)

Function template

b)

Header file

c)

Standard Template Library (STL)

d)

None of the Above

6.

Function overloading do not depend on

a)

number of parameter

b)

return values

c)

order of parameter

d)

differ in type of parameter

7.

Which of the following cannot be static in C?

a)

Variables

b)

Functions

c)

Structures

d)

None of the Above

8.

What symbol is used to Left-Justify within the data given field width in printf()?#0

a)

-(minus sign)

b)

+ (plus sign)

c)

#

d)

0

9.

In printf(), if by mistake you specify more number of arguments, the excess arguments will

a)

produce compile error

b)

produce run-time error

c)

be ignored

d)

produce logical error

10.

In C, if you pass an array as an argument to a function, what actually gets passed?

a)

Value of elements in array

b)

Base address of the array

c)

First element of the array

d)

Address of the last element of array

11.

What function should be used to free the memory allocated by calloc() ?

a)

dealloc();

b)

malloc(variable_name, 0)

c)

free();

d)

memalloc(variable_name, 0)

12.

Comment on the following pointer declaration: int *ptr, p;

a)

ptr is a pointer to integer, p is not.

b)

ptr and p, both are pointers to integer.

c)

ptr is pointer to integer, p may or may not be.

d)

ptr and p both are not pointers to integer.

13.

Input/output function prototypes and macros are defined in which header file?

a)

conio.h

b)

stdlib.h

c)

stdio.h

d)

dos.h

14.

Does there any function exist to convert the int or float to a string in C?

a)

Yes

b)

No

15.

Which statement will you add in the following program to work it correctly?


#include<stdio.h>

int main()

{

printf("%f\n", log(36.0));

return 0;

}

a)

#include<conio.h>

b)

#include<math.h>

c)

#include<stdlib.h>

d)

#include<dos.h>

16.

What is the similarity between a structure, union and enumeration?

a)

All of them let you define new values

b)

All of them let you define new data types

c)

All of them let you define new pointers

d)

All of them let you define new structures

17.

Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?

a)

rem = 3.14 % 2.1;

b)

rem = modf(3.14, 2.1);

c)

rem = fmod(3.14, 2.1);

d)

Remainder cannot be obtain in floating point division.

18.

Clara is writing a program that will print out the first ten numbers of a times table (chosen by the user). Should she use

a)

a FOR loop

b)

a WHILE loop

19.

We can not declare a multiple function with same name?

a)

True

b)

False

20.

How many times will the following loop execute?


for(j = 1; j <= 10; j = j-1)

a)

Infinite Loop

b)

11

c)

0

d)

Never

21.

Do share your valuable feedback!

4 lines