wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Data Types in C - GeeksforGeeks

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the range of the short int data type in C?

a)

0 to 65,535

b)

-32,768 to 32,767

c)

-2,147,483,648 to 2,147,483,647

d)

0 to 4,294,967,295

2.

What is the size of the char data type in C?

a)

8 bytes

b)

4 bytes

c)

2 bytes

d)

1 byte

3.

What is the range of the float data type in C?

a)

1.2E-38 to 3.4E+38

b)

0 to 255

c)

1.7E-308 to 1.7E+308

d)

-128 to 127

4.

What is the size of the double data type in C?

a)

1 byte

b)

4 bytes

c)

8 bytes

d)

2 bytes

5.

What is the purpose of the void data type in C?

a)

To store integer values

b)

To store single characters

c)

To specify no value

d)

To store decimal numbers

6.

What is the format specifier for printing a float value in C?

a)

%c

b)

%lf

c)

%d

d)

%f

7.

Which data type is used to store only a single character in C?

a)

int

b)

double

c)

float

d)

char

8.

What is the range of the long long int data type in C?

a)

0 to 18,446,744,073,709,551,615

b)

-32,768 to 32,767

c)

0 to 65,535

d)

-(2^63) to (2^63)-1

9.

What is the size of the unsigned char data type in C?

a)

8 bytes

b)

1 byte

c)

2 bytes

d)

4 bytes

10.

What is the format specifier for printing a double value in C?

a)

%f

b)

%d

c)

%lf

d)

%c