Final Flashcards

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

A

input device

24
Q

Batch mode accepts input from

A

information from a file

25
Q

You can redirect output that would normally be shown on the display to a

A

file

26
Q

A syntax error can be identified by the

A

compiler, a runtime error results in failure during execution, and a logic error is an error in the algorithm.

27
Q

You should predict and verify your results using

A

desk-checking to avoid logic errors

28
Q

Problem analysis includes

A

identifying input, output, and relevant formulas

29
Q

An algorithm is

A

a list of steps used to solve a problem

30
Q

Top-down design allows

A

you to subdivide a problem into smaller problems

31
Q

Structure chats are one

A

method used to perform top-down design

32
Q

C libraries include many functions

A

that can be used to per common tasks

33
Q

A sequence control structure is

A

a set of statements that are executed sequentially

34
Q

A selection control structure branches execution based

A

on the evaluation of one or more conditions

35
Q

Relational and equality operators are

A

used to compare two values

36
Q

Logical operators are

A

used to create more complex comparisons

37
Q

The order of operator precedence is

A

-function calls -unary operators, -arithmetic operators, -relational operators, -equality operators, -logical operators, -assignment

38
Q

if statement includes

A

a condition and a branch of execution

39
Q

if else statement includes

A

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
Q

Desk-checking the flow of a selection statement

A

can help ensure your logic is correct

41
Q

When programming

A

you should use consistent names in functions, create cohesive functions, and use constant macros to improve code readability

42
Q

A sequence control structure is

A

a set of statements tat are executed sequentially

43
Q

A selection control structure branches execution based on the

A

evaluation of one or more conditions

44
Q

Relational and equality operators

A

are used to compare two values

45
Q

Logical operators are used

A

to create more complex comparisons

46
Q

A diamond is

A

used on a flowchart to represent a decision

47
Q

Nested if statements can be

A

used when the branch to be executed depends on multiple conditions

48
Q

An if..else if statements is

A

used when you need to execute coed in response to mutually exclusive conditions

49
Q

A switch statement provides an alternative

A

an if…else if statement, provided the condition is based on variable of type int or char