Q131. Which loop is guaranteed to execute at least once?
- while
- for
- do-while
- foreach
Show answer and explanation
Correct answer: C. do-while
do-while checks the condition after the body.
179 practice MCQs on Computer Science for IT Jobs tests. Think of your answer first, then open "Show answer and explanation". These are practice questions, not official examination papers.
Correct answer: C. do-while
do-while checks the condition after the body.
Correct answer: A. 128
IPv6 addresses are 128 bits.
Correct answer: B. Scanner
A scanner digitises documents.
Correct answer: A. .cpp
.cpp is the common C++ extension.
Correct answer: A. 0
Arrays are zero-indexed in C, Java and Python.
Correct answer: B. Government
.gov is for government sites.
Correct answer: C. 4 bits
A nibble is half a byte.
Correct answer: B. Switch
A switch forwards frames by MAC address.
Correct answer: D. Reboot
A reboot restarts the system.
Correct answer: B. print()
Python uses print().