F08_10A_key1

F08_10A_key1 - Exam 1, 10/26/07 PIC 10A, Fall 2008 KEY...

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

View Full Document Right Arrow Icon
Exam 1, 10/26/07 PIC 10A, Fall 2008 KEY Check your discussion section: _____ 2A Rachel _____ 2B Aleka _____ 2C Ricardo _____ 2D Paul You have 50 minutes to complete this exam. You are not allowed to use any books, notes, calculators, or electronic devices. Write your answers carefully. Incomplete, unintelligible, or illegible answers will receive little or no credit. When you are asked to write a program, it is not necessary to comment your code but you are expected to indent appropriately to make your code easier to follow. There are a total of 50 points on this exam. PAGE SCORE POSSIBLE 1 11 2 8 3 6 4 10 5 15 TOTAL 50
Background image of page 1

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

View Full DocumentRight Arrow Icon
1 1.) [2 points] In lecture we discussed the difference between compile errors and runtime errors. Give a specific example of each type of error. A compile error prevents the computer from interpreting the code. Examples include missing semi-colons, typos in variable or reserved word names, and references to undeclared variables. A runtime error means the program executes but produces undesired results. Examples include mathematical calculation mistakes, infinite loops, and references to unitialized variables (garbage values). 2.) [2 points] What does the function fixed in the <iomanip> library do? The fixed function forces the output to be shown with trailing zeros on floating point
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/16/2008 for the course PIC 10A taught by Professor Wittman during the Fall '08 term at UCLA.

Page1 / 6

F08_10A_key1 - Exam 1, 10/26/07 PIC 10A, Fall 2008 KEY...

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

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