0 votes 0 votes The following loop in $’C’$: int i=0; while (i++<0)i--; will terminate will go into an infinite loop will give compilation error will never be executed Others ugcnetcse-june2007-paper2 + – go_editor asked Mar 28, 2020 • edited May 21, 2021 by soujanyareddy13 go_editor 551 views answer comment Share Follow See 1 comment See all 1 1 comment reply vg653 commented Mar 29, 2020 reply Follow Share Loop will never be executed as the very first condition of the loop is not getting satisfied, so there is no way for this loop to be executed. 0 votes 0 votes Please log in or register to add a comment.
2 votes 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. stblue answered Sep 28, 2017 stblue comment Share Follow See all 3 Comments See all 3 3 Comments reply Kaluti commented Oct 1, 2017 reply Follow Share yes option a is correct here 0 votes 0 votes Simar sandhu commented Oct 17, 2017 reply Follow Share a is ryt 0 votes 0 votes Sanjay Sharma commented Feb 14, 2019 reply Follow Share how many times loop get executed 0 or 1 times condition is false so 9 times right ? 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes initially i value is equal to 0 Now While (i++<0) while(0<0) this will be false.then it will get incremented and i value become 1 So therefore we never enter in while loop so option B is incorrect and program terminate successfully means no compiler error so option C,option D are wrong option A is correct here. Mohit Kumar 6 answered May 5, 2020 Mohit Kumar 6 comment Share Follow See all 0 reply Please log in or register to add a comment.