1.

What does the 1…10 indicate?(a) Inclusive range(b) Exclusive range(c) Both inclusive and exclusive range(d) None of the mentionedThe question was posed to me by my school principal while I was bunking the class.The doubt is from For Loop topic in portion Mathematic Operations and Loops of Ruby

Answer»

Right answer is (b) Exclusive range

Explanation: 1…10 MEANS start from one and GO TILL 9 and don’t include 10.



Discussion

No Comment Found

Related InterviewSolutions