Ch 1: Intro to Programming Flashcards

(18 cards)

1
Q

Where is a program stored when it is not currently running?

A

In secondary storage / Hard Disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which part of the computer carries out arithmetic operations?

A

The CPU / Central Processing Unit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Is the compiler part of the computer hardware or software?

A

Software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the most important uses for C++?

A

System software and embedded systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A collection of code that has been programmed and translated that can be used by anyone in their programs is called __?

A

A library

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

__ are a mechanism for avoiding naming conflicts in large programs.

A

Namespaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
int main ()
{
...return 0;
} 
defines a function called main that \_\_ an \_\_ with value 0.
A

Returns an integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A collection of programming instructions that carry out a particular task is called __?

A

A function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Data sent to cout is displayed in a __?

A

Console Window

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

You can send __ and __ to cout.

A

Strings and numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Sending __ to cout starts a new line.

A

endl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When the compiler finds something wrong in your code according to the rules of the programming language, what kind of error is it?

A

Compile-time error or syntax error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The program will still compile and run but with incorrect output for what type of error?

A

Run-time error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Because run-time errors are caused by logical flaws in the code, they are often called __?

A

Logical errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When a signal is sent from the processor to abort the program with an error message, what is that signal called?

A

An exception

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

If you forget the ( ) after main in a C++ program, will you get a compile-time error or a run-time error?

A

Compile-time error

17
Q

A sequence of steps that is unambiguous, executable, and terminating is called _?

18
Q

An informal description of a sequence of steps for solving a problem is called __?