Electrical and Computer Engineering
28 of 52
UAH
CPE 112
The length and size functions
•If myName is a string variable, a call to length looks like this:
–     myName.length()
•The length function requires no arguments, but you must still use parentheses.
•Also, length is value-returning, so the call must appear in an expression.