Do while loop
Both a and b
Do while loop will execute at least one time.
Please login to submit your explanation
You can check your performance of this question after Login/Signup
for(int i=1; i!=10 ; i += 2)
None of the mentioned
As i is initialized with 1 and is incremented by 2 so the termination condition i!=10 will never return false. Hence the loop will execute an infinite number of times.
Will not executes
Compile time error
for(; ;); represents the infinite for loop.
Continue statements can’t be used within switch blocks.
10 9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
As i=10, while(i--);line will execute and make i=0, hence only 0 will be printed .
For loop will terminates when condition returns 0.
for(initialization, condition, inc/dec);
for(initialization, condition, decrement);
for(initialization, condition, inc/dec)
The correct syntax of for loop is : for(initialization; condition; inc/dec)
do-while loop checks the condition first so it is called entry controlled loop.
While loop checks the condition first so it is called entry controlled loop.
Non Zero Value
When condition returns non-zero value then while loop will execute.
Please login to report
Personalized Analytics only Availble for Logged in users
Analytics below shows your performance in various Mocks on PrepInsta
Your average Analytics for this Quiz
Topic-Wise Full Mock and much more
Full Video Course for Zoho
81% of the PrepInsta Prime learners got selected in Zoho
8 out of 10 fresh grads in Zoho are from PrepInsta
6,765+ bought in last 1 year
Prime Mock access is included with Prime Video Subscription
Detailed Analytics and Smart Dashboard
June 10, 2022
Login/Signup to comment