asked 155k views
1 vote
Barry is making a program to process user birthdays. The program uses the following procedure for string slicing: Substring(string, startpos, numchars) returns a substring of string starting at startpos of length numchars. The first character in the string is at position 1. His program starts with this line of code: userbday ← "03/31/84". Which of these lines of code displays the year ("84")?

A) Substring(userbday, 7, 2)
B) Substring(userbday, 6, 2)
C) Substring(userbday, 9, 2)
D) Substring(userbday, 8, 2)

1 Answer

4 votes

Answer: 7, 2

Explanation: trust me

answered
User Austin Adams
by
8.0k points