CS 18000 Final: CS18000 Final Exam 2008 Fall with Solutions

67 views21 pages

Document Summary

There are 4 programming questions worth a total of 110 points. Answer the multiple choice questions on the bubble sheet given and the programming ques- tions on the exam booklet. Fill in the instructor, course, signature, test, and date blanks. Fill in the bubbles that correspond to your name, section and student id in the bubble sheet. For your section number, use the section number for your lab and project turn in. For your student id, use the 10 digit id number on your student id card. Exams without names will be graded as zero. Only the answers on the bubble sheet will be counted. 1: given the program below, which statement should replace //todo#1 in order to get the output. 2: what is the output, when the following piece of code is executed? int[] a = {0, 1, 2}; for (int i = 0; i < a. length; ++i)