[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

JAVA Programming :: Basic Concepts - Discussion

Home > JAVA Programming > Basic Concepts > MCQs Questions Discussion

17 / 64

Which of the following gives the valid output for the above code?

public class ManTin {
public static void main(String[] args) {
int j=2,y=3,z=9;
for(;j<6;j++) {
y = (++y + z++);
System.out.println(y+z);
}
}
}

A25 38 52 67

B22 34 47 61

C23 35 48 62

D27 41 56

Answer: Option (Login/Signup)

Show Explanation

Asked In :: Virtusa

Post Your Answer Here:     

Reply    
Rate This: +1 -0 +
    Report


Report Error

Please Login First Click Here

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here