Олимпиадный тренинг

Задача . 37428


Задача

Темы:
A program has a String variable fullName that stores a first name, followed by a space, followed by a last name. There are no spaces in either the first or last
names. Here are some examples of fullName values: "Anthony Coppola", "Jimmy Carroll", and "Tom DeWire". Consider this code segment that extracts the last
name from a fullName variable, and stores it in lastName with no surrounding blanks:

int k = fullName.IndexOf(" "); //find index of blank
String lastName = /* expression */

Which is a correct replacement for /* expression */?
I) fullName.Substring(k);
II) fullName.Substring(k + 1);
III) fullName.Substring(k + 1, fullName.Length);

(A) I only
(B) II only
(C) III only
(D) II and III only
(E) I and III only

time 1000 ms
memory 32 Mb
Правила оформления программ и список ошибок при автоматической проверке задач

Статистика успешных решений по компиляторам
Комментарий учителя