33%(3)1 out of 3 people found this document helpful
This preview shows page 1 - 2 out of 6 pages.
Midterm ExamCS 152, Computer Programming FundamentalsOctober 7, 2015Name:NetID:Answer all questions in the space provided. Write clearly and legibly, you willnot get credit for illegible or incomprehensible answers. Print your name at thetop of every page.This is a closed book exam. However, each student is allowed to bring one pageof notes to the exam. Also, you are permitted the use of a “dumb” calculatorto perform basic arithmetic.Question:123456TotalPoints:14151512151081Score:1. Multiple Choice Questions(a)(2)Which of the following isnota type of loop in Java?A. do-whileB. forC. ifD. while(b)(2)Which of the following is an integer type?A.booleanB.floatC.doubleD.longE.String(c)(2)If you wanted to store the title of a book in a variable, which of the following types wouldbe best?A.booleanB.charC.doubleD.intE.String(d)(2)If you wanted to store the number of pages in a book in a variable, which of the followingtypes would be best?