Answer:
Output will be 0.As we know that IndexOf method returns 0 if it finds the suitable match or particular value.And here List have 2 items i.e. 1 and 2.So IndexOf will search 1 in list.Therefore it will return 0 because 1 is there in List.
Asked In: Many Interviews |
Alert Moderator