Chapter 4: More Practice with Pointers & Arrays

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

1/5

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:26 AM on 3/30/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

6 Terms

1
New cards

How is the expression: *start++ read or parsed?

*(start++)

NOT: (*start)++

2
New cards

Given the following:

int x[3] = {5,10,15};
int *p = x;

Evaluate *p++

Answer: 10

p points to x[0]

p++ is parsed first, so we get x[1]

*p gets the value at x[1] = 10

3
New cards

Given the following:

int x[3] = {5,10,15};
int *p = x;

Evaluate *++p

Answer: 10

*(++p)

p points to x[0]

++p points to x[1]

*(++p) gets the value at x[1] = 10

4
New cards

Given the following:

int x[3] = {5,10,15};
int *p = x;

Evaluate (*p)++

Answer: 6

p points to x[0]

(*p) gets the value at x[0] = 5

(*p)++ increments the value at x[0] = 6

5
New cards

Given the following:

int x[3] = {5,10,15};
int *p = x;

After all 3 operations, what does p point to and what are the array values?

*p++

*(++p)

(*p)++

Answer: At the end of all operations, p points to x[2], and the array looks like {5, 10, 16}

*p++

p points to x[0]

p++ moves the pointer over to x[1]

*p++ gets the value at x[1] = 10

*(++p)

++p moves the pointer over to x[2] (assuming this happens after the previous step)

*(++p) gets the value at x[2] = 15

(*p)++

gets the value at x[2] = 15, increments x[2] to 16

6
New cards

Explore top notes

note
Music in the Fifteenth Century
Updated 1423d ago
0.0(0)
note
Spanish Final notes
Updated 1023d ago
0.0(0)
note
“OUTLINING”
Updated 1278d ago
0.0(0)
note
Syllabized IGCSE Biology
Updated 214d ago
0.0(0)
note
Music in the Fifteenth Century
Updated 1423d ago
0.0(0)
note
Spanish Final notes
Updated 1023d ago
0.0(0)
note
“OUTLINING”
Updated 1278d ago
0.0(0)
note
Syllabized IGCSE Biology
Updated 214d ago
0.0(0)

Explore top flashcards

flashcards
Waves Unit Terms
24
Updated 197d ago
0.0(0)
flashcards
Leyendas y Mitos
74
Updated 970d ago
0.0(0)
flashcards
(16) reproductive system
71
Updated 1229d ago
0.0(0)
flashcards
Contemporary Visual Arts
54
Updated 194d ago
0.0(0)
flashcards
6/6
53
Updated 298d ago
0.0(0)
flashcards
Latin Roots
115
Updated 1061d ago
0.0(0)
flashcards
Waves Unit Terms
24
Updated 197d ago
0.0(0)
flashcards
Leyendas y Mitos
74
Updated 970d ago
0.0(0)
flashcards
(16) reproductive system
71
Updated 1229d ago
0.0(0)
flashcards
Contemporary Visual Arts
54
Updated 194d ago
0.0(0)
flashcards
6/6
53
Updated 298d ago
0.0(0)
flashcards
Latin Roots
115
Updated 1061d ago
0.0(0)