Thursday, 6 September 2012

After the following code fragment, what is the value in fname? String str; int fname; str = "Foolish boy."; fname = str.indexOf("fool");


A.     0
B.     2
C.     -1
D.     4

Ans: C


No comments: