1.

The following function witty() is a part of some class. What will be the output of the function witty( ) when the value of n is ‘SCIENCE’ and the value of p is 5. Show the dry run/working:void witty (String n, int p) { if (p < 0) System.out.println(" "); else { System. out .printing. char At (p) + " . "); witty (n, p - 1); System.out.print[n. char At (p)]: } }

Answer»

C. 

N.

E.

I.

C.

S.

SCIENCE.



Discussion

No Comment Found

Related InterviewSolutions