are empty loop and infinite loop both same??? explain.
Answers
Answered by
3
LORD CARBIN
=>
An empty loop is a loop that doesn't contain any executable statement, whereas, an infinite loop is a loop that runs an infinite number of times. An empty loop contain only one empty statement.They are mostly used to produce time breaks. for(int a=0;a<10;a++); An infinite loop on the other hand continues forever.
kingmaker13:
hi
Answered by
1
hey mate ur answer is
⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇
An empty loop contain only one empty statement.They are mostly used to produce time breaks.
Ex-for(int a=0;a<10;a++)
;
It may also be written as-
for(int a=0;a<10;a++);
An infinite loop on the other hand continues forever.
Ex-for(int a= 10; ;)
...Other statements
or
for(int a=10;a>1;;)
...Other statement
Similar questions
English,
7 months ago
English,
7 months ago
Social Sciences,
7 months ago
Math,
1 year ago
Math,
1 year ago