2 votes 2 votes Programming in C made-easy-test-series programming-in-c programming + – charul asked Nov 14, 2017 edited Mar 4, 2019 by adeebafatima1 charul 500 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Namit Dhupar commented Nov 14, 2017 reply Follow Share Is B.) the answer? 0 votes 0 votes Hira Thakur commented Nov 14, 2017 reply Follow Share can you explain your approach? 0 votes 0 votes Namit Dhupar commented Nov 14, 2017 reply Follow Share It's just a hunch! (I am yet to practice more in programming section) but according to me the loop will go until i<100 so there's no chance that i will ever be equal to 100 as mentioned by other statements,hence I feel S2 to be the most plausible solution 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes S2 is true. at the end of for loop it is calculating (n-1)! take small example: for(i=1 ;i<3) after execution of this loop, j=2! =2 S3 is also true as at the end of loop only two possibilities are there either i=100 or i==j {if break happens} Akash Mittal answered Nov 14, 2017 edited Nov 14, 2017 by Akash Mittal Akash Mittal comment Share Follow See all 4 Comments See all 4 4 Comments reply Namit Dhupar commented Nov 14, 2017 reply Follow Share It seems i was right indeed! :D (Can you please tell how much valid my approach is?) 0 votes 0 votes charul commented Nov 14, 2017 reply Follow Share at the end of the loop, value of i will be 100, so if we take == in place of =, all will be true. Answer given is D for this. 0 votes 0 votes Akash Mittal commented Nov 14, 2017 reply Follow Share S3 is also true as at the end of loop either i=100 or i==j {if break happens} 0 votes 0 votes Namit Dhupar commented Nov 14, 2017 reply Follow Share Really?but I think during Control part of a for loop such that (i=1 ; i<n ; i++) then max value will be i = n-1, not beyond that of course, if the control would have been i<=n. Then I would have agreed! 0 votes 0 votes Please log in or register to add a comment.