/////////////////////////////////////////////////////// // // parameters.cpp // // Started 1/6/97 by Jeff Ondich // Last modified: 1/6/97 // // 1. Read the program first, predict the output, and // then compile and run it. // // 2. What's the difference between Bert() and Ernie() // (besides nose and skin color, that is)? // // 3. What's the difference between Bert() and Zoe()? // // 4. We'll talk about Bert() vs. Ernie() vs. Zoe() // on Friday. // //////////////////////////////////////////////////////// #include #include void Bert( char c ); void Ernie( char& c ); void Zoe( char *str ); int main( void ) { char myLetter = 'Q'; char myString[100] = "My fish ate my other fish's tail."; Bert( myLetter ); cout << "After Bert: " << myLetter << endl; Ernie( myLetter ); cout << "After Ernie: " << myLetter << endl; Zoe( myString ); cout << "After Zoe: " << myString << endl; return( 0 ); } void Bert( char c ) { c = 'B'; } void Ernie( char& c ) { c = 'E'; } void Zoe( char *str ) { for( int i=0; str[i] != '\0'; i++ ) str[i] = toupper(str[i]); }