Computer Programming - 7.1 to 7.11

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

1/17

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

18 Terms

1
New cards

Describe the format for declaring pointers

variableType *pointerName;

variableType *pointerName, nonPointer;

2
New cards

Describe the initializing of a pointer variable

knowt flashcard image
3
New cards

Describe what happens when & and * are used on a pointer

  • The value of the pointer is used

    • Regardless of the order of * and &

<ul><li><p>The value of the pointer is used</p><ul><li><p>Regardless of the order of * and &amp;</p></li></ul></li></ul><p></p>
4
New cards

Describe the template for writing a function header that takes a pointer as a parameter

outputType functionName(variableType *pointerName);

5
New cards

Use pass-by-reference to cube a number

knowt flashcard image
6
New cards

Describe the declaration of Non-constant pointer to Non-constant data

knowt flashcard image
7
New cards

Describe the declaration of Non-constant pointer to constant data

knowt flashcard image
8
New cards

Describe the declaration of a constant pointer to non-constant data

knowt flashcard image
9
New cards

Describe the declaration of a constant pointer to constant data

knowt flashcard image
10
New cards

Write code to bubble sort an array using pass-by-reference

knowt flashcard image
11
New cards

Describe the template of using sizeof

  • sizeof( variable/structure type)

  • returns number of bytes

  • only works on arrays inside the scope where the array is defined

    • therefore arrays passe to a function will not work with sizeof

12
New cards

Describe the operations that can be done on pointers

knowt flashcard image
13
New cards

Describe the addition of integers to a pointer

knowt flashcard image
14
New cards

Describe the subtraction of pointers by integers

knowt flashcard image
15
New cards

Describe the incrementation and decrementation of pointers

knowt flashcard image
16
New cards

Describe the subtraction of pointers from one another

knowt flashcard image
17
New cards

Describe assigning pointers to one another

knowt flashcard image
18
New cards

Describe the implementation of an array of strings using a template

<p></p>