sample_term_test_1 (2)

sample_term_test_1 (2) - Name:_ Capilano University COMP120...

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

View Full Document Right Arrow Icon
Capilano University COMP120 Sample Term Test #1 1 hour 20 min. Instructions: No calculators, computers, manuals and notes of any kind are allowed on this test. You are NOT required to write any documentation for your code. Note: Points for each question are given in the section instructions or in brackets by question. Section 1: True/False (10 questions, 1 mark each). Read each question very carefully, and write T for true and F for false by each question. 1. The compiler is a program that takes a program written in a high-level language and translates it into machine code. 2. When a floating-point value is assigned to an integer variable, the fractional part is truncated (discarded). 3. An algorithm describes the problem solution step by step, while a computer program solves the problem in one step. 4. 5. An operating system is the software managing the computer hardware only. 6. If a while loop's termination condition becomes true in the middle of the loop body, the loop is exited immediately. 7. In C, the following statements will cause a syntax error. int age = 20; if (age = 30) printf(“age”); 8. To correct logic errors in our code, we re-execute the program with different input values. 9.
Background image of page 1

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

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

This note was uploaded on 11/23/2010 for the course PHYSICS 114 taught by Professor Mike during the Spring '10 term at Capilano.

Page1 / 8

sample_term_test_1 (2) - Name:_ Capilano University COMP120...

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

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