Name: _____________________________ Honor Code Acknowledgment: _______________________ Random Quiz # 9 CPS 08, Spring 1995 February 24, 1995 Problem 1: What's my line? Succinctly, what's the difference in using s.Getline(cin) compared to using cin >> s where s is a string? Problem 2: Bankruptcy What is the purpose of the second parameter of the function GetLine and what is its default value? Problem 3: Breaking the Code Suppose that an encoding scheme maps each letter to the letter before it in the alphabet except for 'a' which gets mapped to 'z' and 'A' which gets mapped to 'Z'. Actual Code Actual Code ----------------------------- a z A Z b a B A c b C B ... ... z y Z Y Write (use the back of necessary) a function Code such that Code('a') returns 'z', Code('c') returns 'b', and, in general, cout << Code(ch) << endl prints the coded version of the character ch passed as a parameter. (Note that char('c' - 1) == 'b').