wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PPS ASSESSMENT - 23/09/2025

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which of the following is a valid identifier in C?

a)

123abc

b)

_var123

c)

break

d)

@count

2.

In C, which storage class stores a variable in memory but limits its scope to the file?

a)

auto

b)

static

c)

extern

d)

register

3.

What will be the output of the following code?

a)

11

b)

12

c)

Undefined behavior

d)

10

4.

Which operator is used to access members of a structure using a pointer?

a)

. (dot)

b)

-> (arrow)

c)

* (asterisk)

d)

& (ampersand)

5.

Which of the following is NOT a keyword in C?

a)

volatile

b)

const

c)

frnd

d)

goto

6.

What will be the size of the following variable in a 32-bit system?

a)

2 bytes

b)

4 bytes

c)

8 bytes

d)

16 bytes

7.

Which operator has the highest precedence in C?

a)

sizeof

b)

++ (increment)

c)

* (multiplication)

d)

&& (logical AND)

8.

What is the output of the following code?

a)

Equal

b)

Not Equal

c)

Compiler Error

d)

Garbage

9.

Which statement is true about ‘lvalue’ and ‘rvalue’ in C?

a)

lvalue refers to constant values only

b)

rvalue can appear on the left-hand side of assignment

c)

lvalue refers to memory location, rvalue refers to stored data

d)

Both are same

10.

Which of the following will stop execution immediately inside a loop?

a)

continue

b)

break

c)

goto

d)

exit(0)

11.

What will happen?

a)

Prints 1 to 5

b)

Infinite loop

c)

Prints 6 once

d)

Compiler error

12.

Which of the following best describes ‘register’ storage class?

a)

Stored in secondary memory

b)

Stored in CPU register (if possible)

c)

Scope is global

d)

Always faster than static

13.

Output of the following code?

a)

6

b)

5

c)

4

d)

Compiler Error

14.

Which looping control statement guarantees at least one execution?

a)

for

b)

while

c)

do…while

d)

None

15.

Which operator cannot be overloaded in C?

a)

sizeof

b)

+

c)

*

d)

==

16.

Which of the following code fragments will result in undefined behavior?

a)

int a=10; printf("%d", a++ + ++a);

b)

int b=20; printf("%d", b-- - --b);

c)

int c=5; printf("%d", c*2);

d)

int d=3; printf("%d", ++d + 2);

17.

What is the output of the following code?

a)

0 1 2 3 4

b)

0 1 2

c)

0 1 2 4

d)

1 2 3

18.

What will be the output of the following code?

a)

Ten

b)

Not Ten

c)

Compiler Error

d)

Nothing is printed

19.

Which of the following about switch-case is FALSE?

a)

Default case is optional

b)

Case labels must be constant expressions

c)

Multiple cases can share same block of code

d)

Break is mandatory in every case

20.


What will be printed by this program?

a)

One Two Three Default

b)

One

c)

One Default

d)

Compiler Error