Pointer Arithmetic Practice
Opgave
Swipe to start coding
- Create a pointer that points to the first variable.
- Find the distance between memory locations of this two variables.
- Using the pointer arithmetic move the pointer to the location of the second variable.
- Modify the value of dereferenced pointer to
50
and output the second variable.
Løsning
solution.cpp
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 2
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Awesome!
Completion rate improved to 5.88
Pointer Arithmetic Practice
Stryg for at vise menuen
Opgave
Swipe to start coding
- Create a pointer that points to the first variable.
- Find the distance between memory locations of this two variables.
- Using the pointer arithmetic move the pointer to the location of the second variable.
- Modify the value of dereferenced pointer to
50
and output the second variable.
Løsning
solution.cpp
Var alt klart?
Tak for dine kommentarer!
Awesome!
Completion rate improved to 5.88Sektion 2. Kapitel 2
single