Advertisements
Advertisements
Question
Give an example to illustrate null loop.
Answer in Brief
Solution
The example of null loop by using for statement is as shown below:
for(j = 1; j <= 10; j++)
{}
There is no statement enclosed under curly braces. Hence, the loop simply repeats 10 times.
shaalaa.com
Is there an error in this question or solution?