Question: Predict the output for the following java codes output: 98, and (char)99 is 'c'. of the corresponding printin statement. Consider the following code segment, note
output: 98, and (char)99 is 'c'. of the corresponding printin statement. Consider the following code segment, note that (int)' a' is 97, int)'b' is Execute the segment, writing each value printed to the right String a "a" char b- 'b' int c- 99: System.out.println (a + bc) System.out.println(a b (char) c)i System.out.println(c + b+ a)i System.out.println(b c+ a)i [3 Points] What is the output of the following recursive code: public static int fun (int n) b. if (n100) return n-10 return fun (fun (n+11)) public static void main(String args[] System.out.printin(fun (99)): [3 Points] What is the output of the following recursive code: public static void fun(int x) c. if (x > 0) fun (--x) System.out.print("t"+x) fun (--x) public static void main (String args [1) fun (4)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
