Cedarville Introduction to C++ Final (Kneorr)

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/71

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

72 Terms

1
New cards

Ostream

short for 'output stream'; a class that supports output; provides the << operator (insertion operator)

2
New cards

Insertion operator

'<<'; for converting different types of data into a sequence of characters; returns a reference to the ostream that called the operator; is evaluated from left to right

3
New cards

Cout

a predefined ostream object that is pre-associated with a system's standard output, usually a computer screen

4
New cards

Istream

short for 'input stream'; a class that supports input; provides the >> operator (extraction operator) to extract data from a data buffer and write the data into different types of variables

5
New cards

Extraction operator

'>>'; skips leading whitespace, extracts as many characters as possible consistent with the target variable's type, converts the extracted characters to the target variable's type, and stores the result into the variable

6
New cards

Cin

a predefined istream pre-associated with a system's standard input, usually a computer keyboard

7
New cards

Manipulator

a function that overloads the insertion operator or extraction operator to adjust the way output appears; defined in the iomanip and ios libraries in namespace std

8
New cards

Floating-point manipulators

functions that format floating-point numbers for output

9
New cards

Fixed

Uses fixed-point notation; from

10
New cards

Scientific

Uses scientific notation; from

11
New cards

setprecision(p)

If stream has not been manipulated to fixed or scientific: sets max number of digits in number; If stream has been manipulated to fixed or scientific: sets max number of digits in fraction only (after the decimal point); from

12
New cards

showpoint

Even if the fraction is 0, show the decimal point and trailing 0s; the opposite is noshowpoint.

13
New cards

setw(n)

Sets character width for next output item.

14
New cards

setfill(c)

Sets fill character for output.

15
New cards

left

Aligns output to the left.

16
New cards

right

Aligns output to the right.

17
New cards

endl

Inserts newline and flushes output buffer.

18
New cards

flush

Flushes the output buffer without newline.

19
New cards

Function

Group of statements for repeated operations.

20
New cards

Function Definition

Specifies function name and statements block.

21
New cards

Function Call

Invokes a function to execute its statements.

22
New cards

Block

List of statements enclosed in braces.

23
New cards

Return Statement

Returns a value of specified type.

24
New cards

Parameter

Input specified in a function definition.

25
New cards

Argument

Value passed to a function's parameter.

26
New cards

Void function

Function that does not return a value.

27
New cards

Modular development

Divides program into testable modules.

28
New cards

Incremental development

Writes and tests small code increments.

29
New cards

Function stub

Function definition without implemented statements.

30
New cards

Unit testing

Tests individual parts of a program.

31
New cards

Testbench

Program to validate function outputs.

32
New cards

Test vector

Unique set of input values for testing.

33
New cards

Border cases

Extreme input scenarios for testing.

34
New cards

Stack frame

Local variables created for each function call.

35
New cards

Pass by value

Copies argument value into function parameter.

36
New cards

Pass by reference

Parameter refers to original argument's memory.

37
New cards

Reference

Variable type referring to another variable.

38
New cards

Const

Prevents modification of function parameters.

39
New cards

Scope

Visibility of variables within program parts.

40
New cards

Global variable

Declared outside any function, accessible globally.

41
New cards

Side effects

Function alters global variables beyond parameters.

42
New cards

Function declaration

Specifies return type, name, and parameters.

43
New cards

Default parameter value

Allows omission of corresponding argument in calls.

44
New cards

Function overloading

Multiple functions with same name, different parameters.

45
New cards

Algorithm

Sequence of steps for task completion.

46
New cards

Runtime

Time taken for algorithm execution.

47
New cards

Linear search

Searches list elements sequentially for key.

48
New cards

Binary search

Searches by checking middle element, halves search space.

49
New cards

Maximum steps for binary search

Requires [log2 N] + 1 steps for N elements.

50
New cards

Sorting

Process of arranging elements in order.

51
New cards

Selection sort

Sorts by selecting next value from unsorted part.

52
New cards

Comparisons in selection sort

Total comparisons proportional to (N-1)x(N/2).

53
New cards

Struct

Defines a new type with subitems.

54
New cards

Data member

Subitem defined within a struct.

55
New cards

Member access operator

Uses dot notation to access struct members.

56
New cards

#define directive

Macro definition that does not end with semicolon.

57
New cards

Pointer

Variable that holds a memory address.

58
New cards

Dynamically allocated array

Array size determined at runtime.

59
New cards

Appending to an array

Create new array, copy elements, delete old.

60
New cards

Member access operator (->)

Accesses members of an object via pointer.

61
New cards

Dereference operator (*)

Retrieves data pointed to by a pointer.

62
New cards

Delete operator

Deallocates memory allocated with new.

63
New cards

nullptr

Pointer assigned with null keyword.

64
New cards

strchr()

Finds first occurrence of character in string.

65
New cards

strrchr()

Finds last occurrence of character in string.

66
New cards

strstr()

Finds first occurrence of substring in string.

67
New cards

Recursive algorithm

Breaks problem into smaller subproblems recursively.

68
New cards

Base case

Describes a non-recursive step in recursion.

69
New cards

Recursive function

Function that calls itself for solving problems.

70
New cards

Fibonacci sequence

Sequence: 0, 1, 1, 2, 3, 5, 8, etc.

71
New cards

Greatest common divisor

Largest number evenly dividing two numbers.

72
New cards

Stack overflow

Occurs from deep recursion exceeding stack memory.