wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Programming in C Test-1

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

Who is the father of C language?

a)

Steve Jobs

b)

Rasmus Lerdorf

c)

Dennis Ritchie

d)

James Gosling

2.

All keywords in C are in ____________

a)

UpperCase letters

b)

LowerCase letters

c)

CamelCase letters

d)

None of the mentioned

3.

Which is valid C expression?

a)

int my_num = 100000;

b)

int my_num = 100,000;

c)

int my num = 1000;

d)

int $my_num = 10000;

4.

What is the sizeof(char) in a 32-bit C compiler?

a)

1 bit

b)

2 bits

c)

1 Byte

d)

2 Bytes

5.

scanf() is a predefined function in______header file.

a)

stdarg. h

b)

iostream.h

c)

conio.h

d)

stdio.h

6.

What will be the output of the following C code?

a)

Hello World! 34

b)

Hello World! 1000

c)

Hello World! followed by a junk value

d)

Compile time error

7.

What will be the output of the following C code? (Input values: x= 7.5, y = 12.8)

a)

7.500000, 12.800000

b)

Run time error

c)

7.500000, 12.8

d)

7.500000, junk

8.

How many times i value is checked in the following C program?

a)

1

b)

2

c)

3

d)

4

9.

What is the output of the following code?

a)

2

b)

15

c)

18

d)

16

10.

What is the range of values that can be stored by int datatype in C?

a)

-(2^31) to (2^31) - 1

b)

-256 to 255

c)

0 to (2^31) - 1

d)

-(2^8) to (2^8) - 1