1/18
Flashcards summarizing key terms and concepts related to arrays and vectors in C++ programming.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Array
A special variable storing an ordered list of data items.
Element
An item within an array.
Index
The location number of an element in an array.
Vector
A safer and more powerful form of an array, used in C++.
Declaration of Vector
A vector is declared using syntax: vector
Accessing Vector Elements
Vector elements are accessed using the .at() method.
Vector Initialization
Vector elements are automatically initialized to zero.
Iterating Through Vectors
Using loops to access and manipulate vector elements.
Vector Size
A function that returns the number of vector elements.
Push Back
A method that appends a new element to the end of a vector.
Pop Back
A method that removes the last element of a vector.
Vector Copy Operation
The = operator performs an element-by-element copy of a vector.
Vector Equality Operation
The == operator compares two vectors element-by-element.
Two-Dimensional Array
An array declared with two dimensions, e.g., int myArray[R][C].
C Strings
Character arrays in C and C++ that store sequences of characters.
Null Character
A special character '