222k views
1 vote
What is the value of the variable named s after the following statements are executed?

string fullName = "Miller, Edward";
int i = fullName.IndexOf(",");
string s = fullName.Substring(0, i);
a. Miller,
b. Miller
c. , Edward
d. Edward

User Megool
by
7.1k points

1 Answer

0 votes

Final answer:

The value of the variable named s after the given statements are executed is Miller.

Step-by-step explanation:

The value of the variable named s after the given statements are executed is Miller.

User Callumacrae
by
7.9k points