C Programming: Key term chapter 4-6
Function body
it operate on the passed data and return at most on value back to the calling function
Arguments
items enclosed within the parentheses in the call statement aka.('Actual arguments'and 'actual parameters')
Logic error
can either cause a run-time error or produce incorrect results - are characterized by erroneous, unexpected, or unintentional output
Input data Validation
checking user input data for erroneous or unreasonable data
Function header
first line of the function that tells the name of the function, return type value, and parameters
Sequential
means that statements are executed in sequence(Done in the main function)
Pseudorandom number
numbers that are sufficiently random for the task
Nested if statements
one or more if-else statements within an if or if-else statement
Compound statements
one or more statements contained between braces
Default
operates the same as the last else statements; default label is optional
Switch
switch statement is a specialized selection statement that can be used in place of an if-else chain where exactly equality to one or more integer constants is required
Repetition
used to repeat a set of statements
Short circuit evaluation
whenever the truth or falsity of an expression containing any logical operators is definitely determined, evaluation stops, regardless of how many additional operations may exists
Null statement
A semicolon with nothing preceding it; is also a statement Ex.for(;count<=20;)
Iteration
Each repetition that is 'passed through the loop'
Comma separated list
List in C,where commas are required to separate individual expressions in the lists. Ex. for(c=1;c<=8;printf("%d",c),c+=2)
Stub
a fake function/ the beginning of a final function that is used as a placeholder for the final function until the function is completed
Nested loop
a loop contains within another loop
Posttest loop
a loop that evaluates a condition at the end of the repeating section of the code aka.(Exit controlled Loop)
Debugger
a program that controls the execution of a C program, can interpret the C program at any point in its execution and can display the vales of all variables at the point of interruption
Random number
a series of numbers whose order cannot be predicted
Echo printing
add temporary code that displays the variable of all input date to check the input received
Fixed count loop
aka.(counter-controlled loop) the condition is used to keep track of the number of repetitions that have occurred (for loop)
Parameter
argument names in the header line aka.('formal parameters' and 'formal arguments')
Case
compares the values that will be compared
relational expression
consist of relational operator that compare two operands
sentinel
data values used to signal either the start or the end of a data series
Funtion prototype
declaration statement for a function
Compile time and Run time
distinguish between errors based on when the error is detected
Run-time error
error that occur while the program is running
Compile-time error
errors detected by the compiler aka.('syntax error' or 'parse error')
Break
identifies the end of a particular case
If-else chain
if statement following by if else statements and ending with an else statement
Program tracing
imitate the computer and execute each statement by hand
Diagnostic printf()
include the printf() function in the program to display the value of selected variables
Invocation
invoking a sequence of instruction using a single statement
Selection
is used to select which statements are to be performed next based on a condition being true or false (done using if-else conditional statements)
Entrance controlled loops
pretest loop
relational operator
shows the relationship between two operands
EOF (End Of File)
signals the compiler to stop the loop
One-way if statement
simplest C selection statement
Typographical errror
spelling errors
if(condition)
statements are executed if condition is true
Pretest loop
the case where the test occurs at the beginning of the loop before any statement within the loop is executed e.g. for and while loop
Outter loop
the first loop that controlled the inner one
Calling function
the function that does the calling
Called function
the function that is called into action
Lifetime
the length of time that storage locations are reserved for a variable
Scaling
the method for adjusting the random numbers produced by a random-number generator to reside within a specific range
Desk checking
the method for detecting errors before a program iscompiled
Program testing
the method for detecting errors wither while the program is executing or after it has executed
Flow of Control
the order in which a program's statements are executed
Defensive Programming
the program includes code to check for improper data before an attempt is made to process it further
Inner loop
the second loop that is within the outer loop
Loop
the section of the code that is repeated
Program loop
the transfer of control back to the start of a while statement to reevaluate the expression
Pass by Value (call by value)
the value of the variables are passed into the called function for each argument