Exam3

Page 1

HIGHER INSTITUTE OF TECHNOLOGY-10th of RAMADAN

EXAM DURATION: 60 MINUTES

COMPUTER SCIENCE DEPARTMENT

Apr. 2015

STRUCTURED PROGRAMMING *Student Name:

Exam#3 * Student ID:

Mark:

30

_________________________________________________________________________________________ Q1: TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false. 1) In C++, key words are written in all lowercase letters. Answer:

True

False

2) A variable called "average" should be declared as an integer data type because it will probably hold data that contains decimal places. Answer:

True

False

3) The following code correctly determines whether x contains a value in the range of 0 through 100. if (x >= 0 && <= 100) Answer:

True

False

4) C++ does not have a built in data type for storing strings of characters. Answer:

True

False

5) Both of the following if statements perform the same operation. if (sales > 10000) commissionRate = 0.15; if (sales > 10000) commissionRate = 0.15; Answer:

True

False

6) The only difference between the get function and the >> operator is that get reads the first character typed, even if it is a space, tab, or the [Enter] key. Answer:

True

False

1


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.