CS 213 Data Structures and Algorithms Midterm Practice

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/27

flashcard set

Earn XP

Description and Tags

Practice flashcards covering core C++ foundations, Big-O complexities, data types, functions, pointers, arrays, and structs from the CS 213 Midterm Practice questionnaire.

28 Terms

1
New cards

int main()

The entry point of a C++ program.

2
New cards

double

A C++ data type appropriate for representing decimal numbers requiring greater precision.

3
New cards

Integer Division

Arithmetic division where both operands are integers, causing the fractional part to be truncated (for example, 10/3=310 / 3 = 3).

4
New cards

Modulus Operator (%)

An arithmetic operator that returns the remainder of an integer division.

5
New cards

Abstract Data Type (ADT)

A specification of a data type that defines what operations can be performed, rather than their implementation details or memory allocation.

6
New cards

Address-of Operator (&)

An operator used to obtain or return a variable's memory address.

7
New cards

Dereference Operator (*)

An operator used to access or modify the value stored at a valid pointer's memory address.

8
New cards

Arrow Operator (->)

An operator used to access a struct member through a pointer.

9
New cards

Identifier

A user-defined name given to a variable or function in C++.

10
New cards

Keyword

A reserved C++ word with a predefined meaning, such as int, while, or return.

11
New cards

char

A data type used for storing a single character enclosed in single quotation marks.

12
New cards

Equality Operator (==)

A comparison operator used to test whether two values are equal.

13
New cards

Logical AND (&&)

A logical operator that evaluates to true only when both given conditions are true.

14
New cards

Function

A reusable block of code designed to perform a specific task.

15
New cards

Parameter

The placeholder variable declared in a function definition.

16
New cards

Argument

The actual value passed to a function when it is called.

17
New cards

Pass-by-value

A parameter-passing mechanism that sends a copy of the original variable to a function, ensuring changes inside the function affect only the local copy.

18
New cards

Pointer

A variable that stores the memory address of another variable.

19
New cards

Array

A collection of elements of the same type stored in contiguous memory locations.

20
New cards

Array Traversal

The process of visiting each element of a data structure sequentially to inspect or display it.

21
New cards

Linear Search

A search method that examines elements of a collection sequentially until a target is found.

22
New cards

Constant Time (O(1)O(1))

A time complexity classification where runtime remains constant as input size grows, such as directly accessing an array element by index.

23
New cards

Linear Time (O(n)O(n))

A time complexity classification where runtime grows proportionally to the input size, typical of a single loop processing nn elements.

24
New cards

Quadratic Time (O(n2)O(n^2))

A time complexity classification commonly resulting from two nested loops that each run nn times.

25
New cards

Auxiliary Space

The extra memory needed by an algorithm to execute, excluding its original input space.

26
New cards

struct

A user-defined data type in C++ grouping related members together, possibly of different types, whose definition ends with a semicolon.

27
New cards

Dot Operator (.)

The operator used to access a member of a regular struct instance (such as student.name).

28
New cards

Array Decay

The conversion where arrays passed to functions decay to pointers, requiring the size of the array to be passed as a separate parameter.