Study Guides (248,683)
Canada (121,693)
COMP 1005 (5)
all (2)
Midterm

Practice midterm.docx

13 Pages
240 Views

Department
Computer Science
Course Code
COMP 1005
Professor
all

This preview shows pages 1,2,3. Sign up to view the full 13 pages of the document.
Description
Summer2010COMP10051405Test1 MULTIPLECHOICE2markseach 1Supposex1y1andz1WhatistheprintoutofthefollowingstatementPleaseindentthestatementcorrectlyfirstif x0if y0Systemoutprintlnx0 and y0 else if z0Systemoutprintlnx0 and z0 Ax0andy0Bx0andz0Cx0andz0Dnoprintoutpublic class Q1 public static void mainString args int x1int y1int z1 if x0 if y0 Systemoutprintlnx0 and y0 else if z0 Systemoutprintlnx0 and z02Analyzethefollowingcodeboolean evenfalse if eventrue SystemoutprintlnIt is evenATheprogramhasasyntaxerrorBTheprogramhasaruntimeerrorCTheprogramrunsfinebutdisplaysnothingDTheprogramrunsfineanddisplaysItisevenpublic class Q2 public static void mainString args boolean evenfalseif eventrue SystemoutprintlnIt is even
More Less
Unlock Document

Only pages 1,2,3 are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit