Home »
MCQs »
Scala MCQs
The Output of the following block of code | Scala Question 9
65. Output of the following block of code -
for(i <- 1 to 2){
for(j <- 1 to 2)
print("(" + i + "," + j + ")\t")
}
- (1,1) (1,1) (1,1) (1,1)
- (1,1) (1,2) (2,1) (2,2)
- (1,1) (2,2) (1,1) (2,2)
- None of these
Answer: B) (1,1) (1,2) (2,1) (2,2)