Question: are strings passed by reference in c++?
Answer: You can pass a string into a function as an argument and take a string reference as a parameter in the function. That would work, although s[1] points to the second character in the string because indices start at 0. A string isn't an array, it is an object of the string class.