Computer Science, asked by Anonymous, 10 months ago

are empty loop and infinite loop both same??? explain.

Answers

Answered by Anonymous
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
kingmaker13: am i
kingmaker13: yes
kingmaker13: number
kingmaker13: your
kingmaker13: for chating
Answered by Anonymous
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


Anonymous: stop chating here
Anonymous: sorry to disturb u
Similar questions