CS-152-Midterm-2015-Fall - Midterm Exam CS 152 Computer Programming Fundamentals Name October 7 2015 NetID Answer all questions in the space provided

CS-152-Midterm-2015-Fall - Midterm Exam CS 152 Computer...

This preview shows page 1 - 2 out of 6 pages.

Midterm Exam CS 152, Computer Programming Fundamentals October 7, 2015 Name: NetID: Answer all questions in the space provided. Write clearly and legibly, you will not get credit for illegible or incomprehensible answers. Print your name at the top of every page. This is a closed book exam. However, each student is allowed to bring one page of notes to the exam. Also, you are permitted the use of a “dumb” calculator to perform basic arithmetic. Question: 1 2 3 4 5 6 Total Points: 14 15 15 12 15 10 81 Score: 1. Multiple Choice Questions (a) (2) Which of the following is not a type of loop in Java? A. do-while B. for C. if D. while (b) (2) Which of the following is an integer type? A. boolean B. float C. double D. long E. String (c) (2) If you wanted to store the title of a book in a variable, which of the following types would be best? A. boolean B. char C. double D. int E. String (d) (2) If you wanted to store the number of pages in a book in a variable, which of the following types would be best?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture