University of Iowa Computer Science Department

Quiz 06


1. Write a C# code fragment that prompts the user to input a string into a string variable named s. Then change the first occurence of the letter 'e' in the string to 'd'. Hint: use the IndexOf and Replace methods provided by the String class.

2. Assume the string variable "s" contains the string "We only have 4 more quizzes to go!". What does

s.Substring(3,4) return?

CLAS CRA ACM | ©2005 The University of Iowa | Modified: .