NEW
Font size
WorksheetsCS1010 Lab 02
Total questions: 10
Worksheet time: 5mins
What will be the value of result?
1
0
Compilation Error
Undefined
What is the output of the following code? (printf %d means printing Decimal value)
0
1
2
3
Which of the following logical expressions evaluates to true in C?
!(0 || 1)
0 && 1
1 && (0 || 1)
0 || (1 && 0)
What is the value of the logical expression?
True
False
Undefined
Null
Which of the following expressions is equivalent to !(a && b) according to De Morgan's laws?
!a && !b
a || b
!a || !b
a && !b
What will be the value of result after executing the following code?
Compilation Error
0
5
7
What will be the output of the following code? (printf is a output printing function in C)
Compilation Error
Undefined Behavior
Condition met
Condition not met
Which of the following expressions is equivalent to !(p || q) && (r || s) using De Morgan's laws?
(!p && !q) && (r || s)
(!p || !q) && (r && s)
!p && !q && (r || s)
p && q && (r || s)
What will be the value of max after executing the following code?
0
10
20
Undefined
Which of the following code snippets correctly finds the smallest of three numbers x, y, and z?
