C++ Arrays - Chapter 2 Flashcards

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

1/9

flashcard set

Earn XP

Description and Tags

Vocabulary and key concepts covering C++ arrays, memory calculation, and string handling functions based on the Chapter 2 lecture notes.

Last updated 6:09 PM on 9/6/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

10 Terms

1
New cards

Array

A collection of elements of the same type placed in contiguous memory locations, used to store a set of values under a single variable name.

2
New cards

Index Number

The position of an element in an array list (also referred to as a subscript) used to access that specific element.

3
New cards

Array Declaration Syntax

The statement syntax used to declare an array in C++: data_type array_name[size];

4
New cards

Array Memory Size Formula

The formula used to calculate total memory allocated for a single dimensional array: total_bytes=sizeof(array_type)×size_of_array\text{total\_bytes} = \text{sizeof(array\_type)} \times \text{size\_of\_array}

5
New cards

Array Initialisation

Assigning initial values to array elements directly within their declaration statement (for example, int score[5] = {98, 87, 92, 79, 85};).

6
New cards

Null Character ('\0')

A character stored in a character array that serves as a string terminator.

7
New cards

cin >> (for String Input)

An input statement in C++ that reads characters until it encounters a white space, allowing only single-word strings to be stored.

8
New cards

Stream Input Functions for Strings

Functions such as getline() and get() that belong to stream classes and are used to input strings containing white spaces.

9
New cards

gets()

A console function used to input strings containing white spaces.

10
New cards

puts() and write()

Functions used to display string data in C++.