How many times is the below loop executed?
(B) Infinite times
Explanation: At the second iteration of the outer loop, i.e. when i = 1, the inner loop will become an infinite loop as the increment condition is j = j+(i/2) and for i = 1, i/2 = 0.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.