wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz

Total questions: 35

Worksheet time: 35mins

Name
Class
Date
1.

Who is the father of C?

a)

Steve jobs

b)

James Gosling

c)

Dennis Ritchie

d)

Rasmus Lerdorf

2.

Which of the following is not a valid C variable name?

a)

int number;

b)

float rate;

c)

int variable_count;

d)

int $main;

3.

All keywords in C are in

a)

Lower Case letters

b)

Upper Case letters

c)

Camel Case letters

d)

None of the above

4.

Which loop is guaranteed to execute at least once?

a)

for

b)

while

c)

do-while

d)

None

5.

Which keyword is used to prevent any changes in the variable with in a C program?

a)

immutable

b)

mutable

c)

constant

d)

volatile

6.

What is an example of iteration in C?

a)

for

b)

while

c)

do-while

d)

all above

7.

Which datatype is not used in Switch case in C?

a)

int

b)

float

c)

char

d)

double

8.

Which operator is used to compare two values in C?

a)

=

b)

==

c)

:=

d)

None of the above

9.

What does the & operator do in C?

a)

Bitwise AND

b)

Returns address of a variable

c)

Logical AND

d)

None

10.

What is the correct syntax to print "Hello World" in C?

a)

printf("Hello World");

b)

printf("Hello World")

c)

print("Hello World");

d)

print("Hello World")

11.

ALU means

a)

Arithmetic Logic unit

b)

Array Logic Unit

c)

Application Logic Unit

d)

Arithmetic Level Unit

12.

&& is which operator?

a)

Bitwise AND operator

b)

Logical AND operator

c)

Relational operator

d)

Conditional operator

13.

What is the max value of unsigned int?

a)

2,147,483,647

b)

4,294,967,295

c)

4,294,967,296

d)

65,535

14.

How many times will the following loop execute?

for(i=1;i<=99;i++);

a)

98

b)

99

c)

100

d)

0

15.

(6<=10) || (10<=6) in the condition?

a)

0(False)

b)

1(True)

c)

6

d)

10

16.

(10!=5) && (5!=10) in the condition?

a)

True

b)

False

c)

5

d)

10

17.

What is the binary equivalent of the decimal number 0111?

a)

1101110

b)

1101111

c)

1110000

d)

1010111

18.

What is the decimal equivalent of the binary number 11111111?

a)

254

b)

255

c)

256

d)

128

19.

What is the output value of k=19/4 ?

a)

4.75

b)

5

c)

4

d)

3

20.

What will happen in this loop?

for(i = 1;i<=5;i--)

a)

Runs 5 times

b)

Infinite loop

c)

Error

d)

Prints nothing

21.

How many bytes will occupy Double?

a)

4

b)

1

c)

2

d)

8

22.

Fourth generation period is?

a)

1945-1955

b)

1955-1965

c)

1975-1990

d)

1990-till now

23.

The third generation of computers used which technology?

a)

Vacuum tubes

b)

Transistors

c)

Microprocessors

d)

Integrated Circuits

24.

What is the output of

do{

print 10

}

while(10<=9)

a)

9

b)

Error

c)

Nothing

d)

10

25.

for(i=2;i<=100;i+2)

print(i)

a)

odd number

b)

natural number

c)

even number

d)

integer

26.

Which statement will come out of entire loop?

a)

Continue

b)

for

c)

do-while

d)

Break

27.

C program language is_____

a)

High level language

b)

low level language

c)

middle level language

d)

machine language

28.

Which datatype occupies least memory in C?

a)

int

b)

float

c)

double

d)

char

29.

Represents

a)

Decision/Condition

b)

Input/output

c)

processing

d)

Start/End

30.

Stands for

a)

Start/End

b)

Processing

c)

Decision/Condition

d)

Input/Output

31.

B,D,F,H,___

a)

K

b)

l

c)

H

d)

J

32.

B,D,H,___

a)

L

b)

N

c)

P

d)

R

33.

2,3,6,18,___

a)

36

b)

108

c)

9

d)

64

34.

0001,0010,0011,___

a)

0100

b)

1100

c)

1111

d)

1010

35.

3,9,27,81,___

a)

244

b)

243

c)

245

d)

246