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)

User Bitprophet
by
7.3k points

1 Answer

4 votes

Answer: 7, 2

Explanation: trust me

User Austin Adams
by
7.0k points