This C# program takes a string "This is a Cow" as input. It finds the index of " is " in the string and replaces the characters " is " with " was " by modifying the character array. It then constructs a new string from the modified character array and prints the output "This was a Cow".
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
26 views1 page
Replacement 222
This C# program takes a string "This is a Cow" as input. It finds the index of " is " in the string and replaces the characters " is " with " was " by modifying the character array. It then constructs a new string from the modified character array and prints the output "This was a Cow".