2003FCTestQuestions

2003FCTestQuestions - CompSci 101 S1 C THE UNIVERSITY OF...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CompSci 101 S1 C THE UNIVERSITY OF AUCKLAND FIRST SEMESTER, 2003 COMPUTER SCIENCE Principles of Programming TERMS TEST (Time allowed: 60 MINUTES) Surname: Forenames: Student ID number: Login name (UPI): INSTRUCTIONS: Attempt ALL questions - write your answers in the box provided Calculators are NOT permitted LAB GROUP: Please circle the ONE lab group session below to which you belong When your test is marked, it will be handed back during the lab you specify below Mon 9-11 Tue 9-11 Wed 9-11 Thu 9-11 Fri 9-11 Mon 11-1 Tue 11-1 Wed 11-1 Thu 11-1 Fri 11-1 Mon 1-3 Tue 1-3 Wed 1-3 Thu 1-3 Fri 1-3 Mon 3-5 Tue 3-5 Wed 3-5 Thu 3-5 Wed 5-7
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Question/Answer Sheet - Page 2 - CompSci 101 S1 C SURNAME: . ..................................................... FORENAMES: . .......................................................... CONTINUED RESULTS: For examiner to complete (DO NOT FILL IN): Question Mark Question Mark 1 (/20) 5 (/10) 2 (/10) 6 (/15) 3 (/10) 7 (/10) 4 (/15) 8 (/10) TOTAL: (/100)
Background image of page 2
Question/Answer Sheet - Page 3 - CompSci 101 S1 C SURNAME: . ..................................................... FORENAMES: . .......................................................... CONTINUED Question 1 (20 marks) a) What is printed by the following? System.out.println( 3 + 5.3 ); (1 mark) b) What is printed by the following? System.out.println( 3 / 2 + 1.0 ); (1 mark) c) What is printed by the following? System.out.println( 1.0 * 3 / 2 ); (1 mark) d) What is printed by the following? int a = 9; double b = 1.5; b = a; System.out.println( b ); (1 mark)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Question/Answer Sheet - Page 4 - CompSci 101 S1 C SURNAME: . ..................................................... FORENAMES: . .......................................................... CONTINUED e) What is printed by the following? int a = 3; int b = 2; a = b; b = a; System.out.println( a + b ); (1 mark) f) What is printed by the following? System.out.println( 3.5 + (int)3.5 ); (1 mark) g) What is printed by the following? System.out.println( (double)3 + 2/3 ); (1 mark) h) What is printed by the following? System.out.println( 20 % 2 ); (1 mark)
Background image of page 4
Question/Answer Sheet - Page 5 - CompSci 101 S1 C SURNAME: . ..................................................... FORENAMES: . ..........................................................
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/01/2012 for the course COMPSCI 101 taught by Professor Adrianaferraro during the Summer '12 term at Auckland.

Page1 / 16

2003FCTestQuestions - CompSci 101 S1 C THE UNIVERSITY OF...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online