Control Instructions - Point Out Errors :: Discussion


4.Point out the error, if any in the while loop?
A.There should be a condition in the while loop
B.There should be at least a semicolon in the while
C.The while loop should be replaced with for loop.
D.Error
Answer:  Option  A
Explanation:

The while() loop must have conditional expression or it shows "Expression syntax" error.

Examplewhile(i > 10){ ... }

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers