Midterm - UNIVERSITY OF ONTARIO INSTITUTE OF TECHNOLOGY...

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

View Full Document Right Arrow Icon
UNIVERSITY OF ONTARIO INSTITUTE OF TECHNOLOGY FOUNDAMENTAL OF PROGRAMMING CSCI 1020U Thursday, February 28, 2008 12:40-2:00 PM Midterm Last Name: First Name: Student ID: Instructions: Use a pen to fill in the front page. This is a closed book examination and computers cannot be used. There are 7 questions on this exam. Attempt all questions. Show all of your work. Answer the questions in the space provided; if you need more space, use the back of the paper, or the extra space provide on the ninth page. Question # Points Available Points Earned 1 9 2 14 3 16 4 13 5 16 6 20 7 12 Total 100
Background image of page 1

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

View Full DocumentRight Arrow Icon
CSCI 1020 Midterm Feb.28, 2008 Name: 1. [ 9 marks ] In the questions below, determine whether the statement is TRUE or FALSE. a. When overloading a function, the function names should be different with different number and/or types of parameters. F A L S E b. Main memory holds its data if the computer is turned off. FALSE c. There are 8 bytes in one bit. FALSE d. Constant variables that might be used in different functions should be global. T R U E e. In an enumerated data type, different constants do not have the same value. F A L S E f. It is acceptable to have both call-by-value and call-by-reference parameters in the same function declaration. T R U E g. The following is legal in a void function return; T R U E h. The following function will work with any size integer array. void function1(int array[], int numElements); T R U E i. A Boolean expression is an expression that can be thought of as being true or false. TRUE Page 2 of 10
Background image of page 2
CSCI 1020 Midterm Feb.28, 2008 Name: Page 3 of 10 2. [14 marks] Multiple choice 1) The set of instructions that a computer will follow is known as: a. Hardware b. Algorithm c. Program d. C P U A n s w e r : c 2) One of the biggest difference between C and C++ is: a. C is object-oriented b. C++ is object-oriented c. All C++ programs are also C programs
Background image of page 3

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

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

This note was uploaded on 04/22/2008 for the course PROGRAMMIN 1020U taught by Professor Isteau during the Spring '08 term at UOIT.

Page1 / 10

Midterm - UNIVERSITY OF ONTARIO INSTITUTE OF TECHNOLOGY...

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

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