Final Flashcards

(49 cards)

1
Q

What is responsible for executing program instructions?

A

Central Processing Unit

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

A program read data from what input device

A

Keyboard

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

A program outputs data to what output device?

A

Monitor or printer.

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

An operating system is responsible for

A

managing the allocations of resource like memory and processor time.

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

A compiler translates human-readable source code into what?

A

Binary machine language a processor can understand.

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

The general steps in the software development method are

A
Specify the Problem requirements
Analyze the problem
Design the algorithm to solve the problem
Implement the algorithm 
Test and verify the completed program
Maintain and update the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The #include directive is

A

used to specify that a program uses functions defined in a library

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

The #define directive is

A

used to define a constant macro, which is a name that represents a value that doesn’t change.

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

The main functions is the

A
point at which program execution begins
int main(void)
{
            return (0);
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Reserved words and standard identifies have special meaning to a C compiler

A

Reserved words Standard identifiers

  • int printf
  • void scanf
  • double
  • return
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

User-defined identifiers can have

A

only letters, digits, and underscores and cannot begin with a digit

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

C is a

A

case sensitive programming language

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

A variable is

A

a name that represents a memory location that stores data of a specific data type

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

An assignment statement stores

A

a value in memory location

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

Input and output functions are

A

defined in the standard input and output library

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

The printf function outputs data

A

to the standard output device

printf(“Hello Class\n”);

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

The scanf function reads data

A

from the standard input device

scanf(“%c%c”, &FirstInitial, &LastInitial);

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

Preprocessor directives

A
precede the main function in a C program.  A preprocessor directive is processed before a program is complied.
#include
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Comments are used to

A
document a program to make it easier to read and maintain
/*This is an example of a comment.*/
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

C includes arithmetic operators for

A

addition, subtraction, multiplication, division, and remainder.

21
Q

Variables can be converted between data types by using a

A

cast; however data will be lost when converting from a real number to whole number

22
Q

You can format numeric output by using

A

format strings

23
Q

Interactive mode accepts input from an

24
Q

Batch mode accepts input from

A

information from a file

25
You can redirect output that would normally be shown on the display to a
file
26
A syntax error can be identified by the
compiler, a runtime error results in failure during execution, and a logic error is an error in the algorithm.
27
You should predict and verify your results using
desk-checking to avoid logic errors
28
Problem analysis includes
identifying input, output, and relevant formulas
29
An algorithm is
a list of steps used to solve a problem
30
Top-down design allows
you to subdivide a problem into smaller problems
31
Structure chats are one
method used to perform top-down design
32
C libraries include many functions
that can be used to per common tasks
33
A sequence control structure is
a set of statements that are executed sequentially
34
A selection control structure branches execution based
on the evaluation of one or more conditions
35
Relational and equality operators are
used to compare two values
36
Logical operators are
used to create more complex comparisons
37
The order of operator precedence is
-function calls -unary operators, -arithmetic operators, -relational operators, -equality operators, -logical operators, -assignment
38
if statement includes
a condition and a branch of execution
39
if else statement includes
a condition, a block of code that executes when the condition is true, and a different block that executes when the condition is false
40
Desk-checking the flow of a selection statement
can help ensure your logic is correct
41
When programming
you should use consistent names in functions, create cohesive functions, and use constant macros to improve code readability
42
A sequence control structure is
a set of statements tat are executed sequentially
43
A selection control structure branches execution based on the
evaluation of one or more conditions
44
Relational and equality operators
are used to compare two values
45
Logical operators are used
to create more complex comparisons
46
A diamond is
used on a flowchart to represent a decision
47
Nested if statements can be
used when the branch to be executed depends on multiple conditions
48
An if..else if statements is
used when you need to execute coed in response to mutually exclusive conditions
49
A switch statement provides an alternative
an if...else if statement, provided the condition is based on variable of type int or char