Question 23

Study the following programme
// precondition : x >= 0
public void demo(int x)
{
System.out.print(x %10);Β 

if( (x /10)! = 0)
{
demo(x / 10);
}
System.out.print(x % 10);
}
Which of the following is printed as a result of the call demo (1234)?

Create a FREE account and get:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free

Join CAT 2026 course by 5-Time CAT 100%iler

Crack CAT 2026 & Other Exams with Cracku!

Ask AI

Ask our AI anything

AI can make mistakes. Please verify important information.