Write a program that reads a word and prints all substrings, sorted by length. Forexample, if the user provides the input "rum", the program printsrumruumrum
Score:_______ / 100 EECS 138 C++ Exam 2 Spring 2016 - Review Name: _________________________ KUID: _________________________ Instructor: _________________________ Class Time: _________________________ Write clearly, using pencil. You have 120 minutes to complete the exam. Unless stated otherwise, please write only the C++ code needed to answer the question, not a complete program. No electronic devices (cell phones, calculators, etc.) may be used during the exam! Before you begin, ensure your exam is complete. There should be 5 parts and 14 pages, including this one. ● Part 1 (Multiple Choice) consists of 5 questions (10 Points). ● Part 2 (Short Answer) consists of 8 questions (40 Points). ● Part 3 (Tracing) consists of 2 questions (14 Points). ● Part 4 (Functions) consists of 3 questions (20 Points). ● Part 5 (Program Writing) consists of 1 question (16 Points). There is a total of 19 questions. Academic Integrity: It is expected that the work you do on this exam is your own. Any instance of dishonesty will result in an immediate grade of zero on this exam, and a report of the incident will be sent to the dean’s office. Page 1 of 14 Part 1 – Multiple Choice (2 points each; 10 points total) Circle the most appropriate answer for each of the follo