C++ Programming

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

1/65

flashcard set

Earn XP

Description and Tags

Comprehensive Study Guide Flashcards

Last updated 12:02 AM on 5/14/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

66 Terms

1
New cards

Computer Programming

The process of creating instructions for computers to perform specific tasks, generally following the Input-Process-Output (IPO) model.

2
New cards

include

A directive that tells the preprocessor to include the iostream library, which enables input/output operations in C++.

3
New cards

using namespace std;

Allows the use of names from the standard library without prefixing them with std:: in C++.

4
New cards

main() function

Every C++ program must have a main() function, which is the entry point where execution begins.

5
New cards

cout statement

Outputs text to the screen in C++.

6
New cards

endl

Adds a newline character to the output stream in C++.

7
New cards

return 0;

Indicates that the program has executed successfully in C++.

8
New cards

Program

A sequence of instructions executed by a computer.

9
New cards

Algorithm

A step-by-step procedure for solving a problem.

10
New cards

Computational Thinking

Breaking down problems into steps that a computer can execute.

11
New cards

Statements

Individual instructions in a program, typically ending with a semicolon (;).

12
New cards

Comments

Text that explains code but is ignored by the compiler; single-line comments begin with //, and multi-line comments are enclosed between /* and */.

13
New cards

Whitespace

Spaces, tabs, and newlines that improve code readability but are mostly ignored by the compiler.

14
New cards

cout

Used for output with the insertion operator (<<) in C++.

15
New cards

cin

Used for input with the extraction operator (>>) in C++.

16
New cards

endl or \n

Creates a new line in the output in C++.

17
New cards

Syntax Errors

Violations of the language's grammatical rules, such as missing semicolons or unmatched brackets; detected during compilation.

18
New cards

Logic Errors (Bugs)

The program compiles but doesn't behave as expected, for example, using < instead of <= in a condition; only found during execution or testing.

19
New cards

Warnings

Potential issues flagged by the compiler that are not severe enough to prevent compilation but should be addressed to avoid potential problems.

20
New cards

CPU

Executes machine instructions in a computer system.

21
New cards

Memory

Stores data and instructions in a computer system.

22
New cards

Storage

Permanently holds files and programs in a computer system.

23
New cards

Integrated Development Environment (IDE)

Combines various programming tools like a text editor, compiler, debugger, and build automation tools.

24
New cards

Variable

A named storage location in memory that holds a value of a specific type.

25
New cards

Variable Declaration

Specifies a name and a data type for a variable (e.g., int age;).

26
New cards

Variable Assignment

Assigns a value to a variable using the assignment operator (=) (e.g., age = 25;).

27
New cards

int

Integer data type, typically 4 bytes, representing whole numbers.

28
New cards

short

Short integer data type, typically 2 bytes, representing smaller whole numbers.

29
New cards

long

Long integer data type, typically 4 bytes (same as int on most systems), representing larger whole numbers.

30
New cards

long long

Very long integer data type, typically 8 bytes, representing very large whole numbers.

31
New cards

float

Single-precision floating-point data type, typically 4 bytes, representing decimal numbers with limited precision.

32
New cards

double

Double-precision floating-point data type, typically 8 bytes, representing decimal numbers with higher precision.

33
New cards

char

Character data type, typically 1 byte, representing a single character.

34
New cards

bool

Boolean data type, typically 1 byte, representing true or false values.

35
New cards

Identifiers

Names given to variables, functions, and other entities in a program; must begin with a letter or underscore, can contain letters, digits, and underscores, and cannot be a C++ keyword.

36
New cards

Lower Camel Case

A naming convention where the first word is lowercase, and subsequent words have a capital first letter (e.g., studentName).

37
New cards

Snake Case

A naming convention where all words are lowercase, and underscores separate them (e.g., student_name).

38
New cards

unsigned

A type modifier that modifies integer types to only represent non-negative values, doubling the positive range but eliminating negative values.

39
New cards

const

A keyword that creates variables whose values cannot change after initialization (e.g., const double PI = 3.14159;).

40
New cards

Expressions

Combine variables, constants, and operators to perform computations; evaluated according to operator precedence.

41
New cards

Integer Division

Truncates the result, removing any fractional part (e.g., 7 / 3 results in 2).

42
New cards

Modulo

Returns the remainder of a division (e.g., 7 % 3 results in 1).

43
New cards

Implicit Conversions

Automatic type conversions performed by the compiler in certain situations, such as assigning an int to a double.

44
New cards

Explicit Conversions (Casting)

Type conversions that are manually specified by the programmer using C-style casts or modern C++ cast operators like static_cast().

45
New cards

sqrt(x)

Square root of x

46
New cards

pow(x, y)

x raised to power y

47
New cards

abs(x) or fabs(x)

Absolute value

48
New cards

ceil(x)

Rounds up

49
New cards

floor(x)

Rounds down

50
New cards

round(x)

Rounds to nearest

51
New cards

A library that provides character testing and manipulation functions.

52
New cards

A library provides powerful string operations.

53
New cards

break

A statement that immediately exits a loop.

54
New cards

continue

A statement that skips the rest of the current iteration and moves to the next iteration.

55
New cards

Arrays

Fixed size, cannot be resized after declaration

56
New cards

Vectors

Dynamic size, can grow or shrink as needed

57
New cards

Multidimensional Arrays are useful for

Representing tables, grids, or matrices

58
New cards

Function

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

59
New cards

Function Definition

A named block of code with input parameters and a return value; used to break down a program into manageable parts.

60
New cards

Function Call

The process of calling a function to execute its code.

61
New cards

Arguments/Parameters

Values passed into a function when it is called.

62
New cards

Return Type

The data type of the value that a function returns after execution.

63
New cards

Variable Scope

The scope where a variable is accessible; can be local (within a function) or global (accessible throughout the program).

64
New cards

Recursion

A function that calls itself; requires a base case to terminate the recursive calls.

65
New cards

Pass by Value

Passing a copy of the variable's value to a function.

66
New cards

Passing the memory address of a

Explore top notes

note
Demonstrative Pronouns
Updated 1235d ago
0.0(0)
note
Chapter 28: Forensic Psychiatry
Updated 1078d ago
0.0(0)
note
Cervical Strain
Updated 1135d ago
0.0(0)
note
5.2 Photosynthesis
Updated 1149d ago
0.0(0)
note
APUSH
Updated 1273d ago
0.0(0)
note
Chapter 9: Visualizing Cells
Updated 987d ago
0.0(0)
note
Demonstrative Pronouns
Updated 1235d ago
0.0(0)
note
Chapter 28: Forensic Psychiatry
Updated 1078d ago
0.0(0)
note
Cervical Strain
Updated 1135d ago
0.0(0)
note
5.2 Photosynthesis
Updated 1149d ago
0.0(0)
note
APUSH
Updated 1273d ago
0.0(0)
note
Chapter 9: Visualizing Cells
Updated 987d ago
0.0(0)

Explore top flashcards