MCQ
When does a while loop check its condition?
Unit-3 Programming Fundamentals
A
After executing the body
B
Before executing the body
C
Only once at the start
D
Randomly during execution
Explanation
A while loop checks the condition before each iteration, so it may run zero times.
Related MCQs
In JavaScript, what data type is the value "Hello World"?
Unit-3 Programming Fundamentals
View
Which tag creates an unordered (bulleted) list?
Unit-3 Programming Fundamentals
View
Which attribute is used with the <a> tag to specify the destination of the link?
Unit-3 Programming Fundamentals
View
Which CSS selector uses a dot (.) at the beginning?
Unit-3 Programming Fundamentals
View
What is the difference between == and === in JavaScript?
Unit-3 Programming Fundamentals
View
Which loop condition correctly prints the numbers 1 to 10 using a for loop?
Unit-3 Programming Fundamentals
View