WorksheetsPPS ASSESSMENT - 23/09/2025
Total questions: 20
Worksheet time: 10mins
Which of the following is a valid identifier in C?
123abc
_var123
break
@count
In C, which storage class stores a variable in memory but limits its scope to the file?
auto
static
extern
register
What will be the output of the following code?
11
12
Undefined behavior
10
Which operator is used to access members of a structure using a pointer?
. (dot)
-> (arrow)
* (asterisk)
& (ampersand)
Which of the following is NOT a keyword in C?
volatile
const
frnd
goto
What will be the size of the following variable in a 32-bit system?
2 bytes
4 bytes
8 bytes
16 bytes
Which operator has the highest precedence in C?
sizeof
++ (increment)
* (multiplication)
&& (logical AND)
What is the output of the following code?
Equal
Not Equal
Compiler Error
Garbage
Which statement is true about ‘lvalue’ and ‘rvalue’ in C?
lvalue refers to constant values only
rvalue can appear on the left-hand side of assignment
lvalue refers to memory location, rvalue refers to stored data
Both are same
Which of the following will stop execution immediately inside a loop?
continue
break
goto
exit(0)
What will happen?
Prints 1 to 5
Infinite loop
Prints 6 once
Compiler error
Which of the following best describes ‘register’ storage class?
Stored in secondary memory
Stored in CPU register (if possible)
Scope is global
Always faster than static
Output of the following code?
6
5
4
Compiler Error
Which looping control statement guarantees at least one execution?
for
while
do…while
None
Which operator cannot be overloaded in C?
sizeof
+
*
==
Which of the following code fragments will result in undefined behavior?
int a=10; printf("%d", a++ + ++a);
int b=20; printf("%d", b-- - --b);
int c=5; printf("%d", c*2);
int d=3; printf("%d", ++d + 2);
What is the output of the following code?
0 1 2 3 4
0 1 2
0 1 2 4
1 2 3
What will be the output of the following code?
Ten
Not Ten
Compiler Error
Nothing is printed
Which of the following about switch-case is FALSE?
Default case is optional
Case labels must be constant expressions
Multiple cases can share same block of code
Break is mandatory in every case
What will be printed by this program?
One Two Three Default
One
One Default
Compiler Error
