The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+1 vote
The following loop in ‘C’:
int i=0;
(A) will terminate
(B) will go into an infinite loop
(C) will give compilation error
(D) will never be executed


asked in Programming by Boss (7.8k points) | 102 views

1 Answer

+2 votes
In while loop, first i value will compare with 0, then it will get incremented.
So 0 < 0, is certainly false, therefore we never enter while loop,and programme terminate successfully.
option A is correct here.
answered by Boss (7.5k points)
yes option a is correct here
a is ryt

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

33,700 questions
40,250 answers
38,858 users