Test questions Flashcards Preview

Computer Science > Test questions > Flashcards

Flashcards in Test questions Deck (102)
Loading flashcards...
1

[T/F]
A CPU really only understands instructions that are written in machine language

True

2

[T/F]
Software engineering is a field that encompasses designing, writing, testing, debugging, documenting, modifying, and maintaining computer programs

True

3

[T/F]
Machine language is an example of a high-level language

False

4

[T/F]
In programming, the terms "line" and "statement" always mean the same thing

False

5

[T/F]
Pseudocode is a form of program statement that will always evaluate to "false"

False

6

[T/F]
Escape sequences are always stored internally as a single character

True

7

[T/F]
The cin << statement will stop reading input when it encounters a newline character

true

8

[T/F]
If you do not follow a consistent programming style, your programs will generate compiler errors.

False

9

[T/F]
The C++ language requires that you give variables names that indicate what the variables are used for

false

10

[T/F]
When a program uses the setw manipulator, the iosetwidth header file must be included in a preprocessor directive

False

11

[T/F]
The preprocessor executes after the compiler

False

12

[T/F]
Floating point constants are normally stored in memory as doubles

True

13

[T/F]
When the fixed manipulator is used, the value specified by the setprecision manipulator will be the number of digits to appear after the decimal point.

True

14

[T/F]
In c++, key words are written in all lowercase letters.

True

15

[T/F]
A variable called "average" should be declared should be declared as an integer data type because it will probably hold data that contains decimal points

False

16

You want the user to enter the length, width, and height from the keyboard. What would be the correct cin statement?

cin.get(length, width, height)

17

This term refers to the programmer reading the program from the beginning and stepping through each statement

desk checking

18

This is a set of rules that must be followed when constructing a program

syntax

19

In a broad sense, the two primary categories of programming languages are:

low-level and high-level

20

An integrated Development Environment typically consists of:

a text editor, a debugger, and a compiler

21

What will the following code display:

int number = 7;
cout << "The number is " << "number" << endl;

The number is number

22

The _____ causes a program to wait until information is typed at the keyboard and the enter key is presses

cin object

23

During which stage does the central processing unit retrieve from main memory the next instruction in the sequence of program instructions?

fetch

24

The purpose of a memory address is:

To identify the location of a byte in memory

25

In the following C++ statement, what will be executed first according to the order of precedence?

6 - 3 * 2 + 7 - 10 / 2

3 * 2

26

Internally, the CPU consists of two parts:

the control unit and the arithmetic and logic unit

27

This is used in a program to mark the beginning or ending of a statement, or separate items in a list

punctuation

28

Mistakes that cause a running program to produce incorrect results are called:

logic errors

29

In the C++ instruction,
cookies = number % children;
given the following declaration statement:
int number = 38, children = 4, cookies;
what is the value of cookies after the execution of the statement?

2

30

A variable whose value can be either true or false is of this data type:

bool