ENGN132 - Chapter 2 Flashcards

(43 cards)

1
Q

What is a Preprocessor Directive?

A

Preprocessor Directive is a C program line beginning with # that provides an instruction to the preprocessor

e.g. #define, #include

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

What is a Preprocessor?

A

A preprocessor is a System Program that modifies a C program prior to its compilation

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

What is a Library?

A

A collection of useful functions and symbols that may be accessed by a program

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

What is a Constant Macro?

A

A name that is replaced by a particular constant value before the program is sent to the compiler

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

What is a comment?

A

Comments are text beginning with /* and ending with */ that provide supplementary information but are ignored by the preprocessor and the compiler.

// is used for a quick comment

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

Define Declaration

A

The part of the program that tells the compiler the names of the memory cells in a program

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

What are executable statements?

A

Executable Statements are program lines that are converted to machine language instructions by the compiler and executed by the computer

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

What is a Reserved Word?

A

Reserved Words are words with special meaning in C

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

What is a Standard Identifier?

A

A word having special meaning but one that a programmer may redefine.

Redefinition of Std. Identifiers is not recommended

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

What is a Variable?

A

A variable is a name associated with a memory cell whose value can change

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

What is a Variable Declaration?

A

Statements that communicate to the compiler the names of variables in the program and the kind of information stored in each variable.

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

Define Data Types

A

Data Types are a set of values and operations that can be performed on those values.

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

What is an ASCII code?

A

A particular code that specifies the integer representing each “char” value

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

Define Assignment Statements

A

Instructions that store values or a computational result in a variable.

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

What is an Input Operation?

A

An instruction that copies data from an input device into memory

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

What is an Output Operation?

A

An instruction that displays information stored in memory.

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

What is an Input/Output Function?

A

A C function that performs an input or output operation.

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

Define Function Call

A

Calling or Activating a Function

19
Q

Define Function Argument

A

Enclosed in Parentheses following the function name; provides information required by the function.

20
Q

What is a Format String?

A

In a call to “printf”, a string of characters enclosed in quotes ( “” ), which specifies the form of the output line

21
Q

What is a print list?

A

Print lists occur in a call to “printf”, the variables or expressions whose values are displayed

22
Q

What is a Placeholder?

A

A symbol beginning with % in a format string that indicates where to display the output value

23
Q

What is the ‘Newline Escape Sequence’?

A

The character sequence “\n”, which is used in a format string to terminate an output line.

24
Q

What is a Cursor?

A

A moving place marker that indicates the next position on the screen where information will be displayed.

25
What is a Prompt, or a Prompting Message?
A message displayed to indicate what data to enter in what form.
26
Define Program Documentation
Information (Comments) that enhances the readability to the program. **Increases Readability for Programmer, the user does not see Program Documentation/Comments**
27
What is a Mixed Type Expression?
An expression with operands of different types
28
What is a Mixed Type Assignment?
The expression being evaluated and the variable to which it is assigned have different data types.
29
Define a Type Cast
Converting an Expression to a different type by writing the desired type in Parentheses in front of the expression.
30
Define Unary Operators
An operator with one operand
31
Define Operand
A quantity on which an operation is to be done.
32
Define Binary Operator
An operator containing two operands
33
What is a Representational Error?
An error due to coding a real number as a finite number of binary digits.
34
What is a Cancellation Error?
An error resulting from applying an arithmetic operation to operands of vastly different magnitudes; effect of the smaller operand is lost
35
What is Arithmetic Underflow?
An error in which a very small computational result is represented as zero
36
What is Arithmetic Overflow?
An error that is an attempt to represent a computational result that is too large
37
Define Field Width
The number of Columns used to display a value
38
Define Interactive Mode
A mode of program execution in which the user responds to prompts by entering (typing in) data
39
Define Batch Mode
A mode of program execution in which the program scans its data from a previously prepared data file
40
What is Debugging?
Removing Errors from a Program
41
What is a Syntax Error?
A violation of the C grammar rules, detected during program compilation (translation from programmer language to machine language)
42
What is a Run-time Error?
An attempt to form an invalid operation, detected during program execution
43
What is a Logic Error?
An error caused by following an incorrect algorithm