C++ Data Types: A Beginners Guide

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

1/34

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering C++ data types, input, string escaping, and operators from the notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

35 Terms

1
New cards

Data type

A category that defines what kind of information a variable can store and how much memory it uses.

2
New cards

int

Numeric data type for whole numbers without decimals (e.g., 10, 25, 1000).

3
New cards

float

Numeric data type for floating point numbers with decimals, approximately 6 to 7 digits of precision.

4
New cards

double

Numeric data type with higher precision than float, around 15 decimal digits.

5
New cards

bool

Boolean data type representing true or false values used in logical conditions.

6
New cards

char

Data type storing a single character, enclosed in single quotes.

7
New cards

string

Sequence of characters representing text, enclosed in double quotes.

8
New cards

getline

Function to read an entire line of text from standard input into a string.

9
New cards

escape character

Backslash based sequence to encode special characters inside strings.

10
New cards

backslash

The escape character used to introduce escape sequences.

11
New cards

single quote

Delimiter used to denote a single character value in char literals.

12
New cards

double quote

Delimiter used to denote string literals.

13
New cards

newline escape

Escape sequence that inserts a new line in a string.

14
New cards

tab escape

Escape sequence that inserts a horizontal tab in a string.

15
New cards

Operator

Symbol that performs operations on variables and values in code.

16
New cards

Arithmetic operator

Operator that performs arithmetic like addition, subtraction, multiplication, division, and modulus.

17
New cards

Addition

Operator + that adds two operands.

18
New cards

Subtraction

Operator - that subtracts the second operand from the first.

19
New cards

Multiplication

Operator * that multiplies two operands.

20
New cards

Division

Operator / that divides the first operand by the second.

21
New cards

Modulus

Operator % that returns the remainder of a division.

22
New cards

Increment

Operator ++ that increases a variable by 1.

23
New cards

Decrement

Operator -- that decreases a variable by 1.

24
New cards

Comparison operator

Operators used to compare two values such as equal, not equal, greater, less and their variants.

25
New cards

Equal to

Operator == that tests if two values are equal.

26
New cards

Not equal to

Operator != that tests if two values are not equal.

27
New cards

Greater than

Operator > that checks if the first value is larger than the second.

28
New cards

Less than

Operator < that checks if the first value is smaller than the second.

29
New cards

Greater than or equal to

Operator >= that checks if the first value is larger than or equal to the second.

30
New cards

Less than or equal to

Operator <= that checks if the first value is smaller than or equal to the second.

31
New cards

Boolean values

Results of comparisons are true (1) or false (0).

32
New cards

Logical operator

Operators that combine boolean expressions to form complex conditions.

33
New cards

Logical AND

Operator && that returns true only when both operands are true.

34
New cards

Logical OR

Operator || that returns true if at least one operand is true.

35
New cards

Logical NOT

Operator ! that negates the truth value of its operand.