Arrays

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

1/7

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:43 AM on 6/17/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

8 Terms

1
New cards

Use

storing and managing bigger blocks of data

provide a simple way of storing multiple instances ‘a sequence’ of the same data type

2
New cards

Declaring

int aListOfInts[5]; //array of 5 integers

3
New cards

Indexed from…

0

4
New cards

Initialiser

can initialise only part of the array

starting from 0

int aListOfInts[5] = {1, 2, 3, 4, 5};
aListOfInts[0] = 5; //overwriting the 1st

5
New cards

Arrays

named contiguous data blocks in memory

don’t know how many elements are initialised

6
New cards

Arrays won’t Grow if…

you access memory before or after the allocated space

7
New cards

Array Bounds

C compiler won’t protect you

need to track these yourself and code defensively

8
New cards

Printing a Value in an Array

printf("Element 3 is %d\n", aListOfInts[2]);

Explore top flashcards

Set 1 (Fall Comp 1)
Updated 905d ago
flashcards Flashcards (25)
B1.1 Lipids
Updated 868d ago
flashcards Flashcards (32)
Ekologija
Updated 445d ago
flashcards Flashcards (104)
MGMT 105 Final
Updated 1173d ago
flashcards Flashcards (228)
Microbio Exam 5
Updated 803d ago
flashcards Flashcards (321)
Genetics
Updated 1045d ago
flashcards Flashcards (23)
Set 1 (Fall Comp 1)
Updated 905d ago
flashcards Flashcards (25)
B1.1 Lipids
Updated 868d ago
flashcards Flashcards (32)
Ekologija
Updated 445d ago
flashcards Flashcards (104)
MGMT 105 Final
Updated 1173d ago
flashcards Flashcards (228)
Microbio Exam 5
Updated 803d ago
flashcards Flashcards (321)
Genetics
Updated 1045d ago
flashcards Flashcards (23)