You are looking at lesson 8. Your place is still lesson 1, task 1: Algorithm.
Extra: to the processor, &x is lea (computing an address) and *p is a read in square brackets [ ]. Find them in the assembly of practice/08/pointers.c.
Extra. Not graded. What do & and * look like when the processor runs them?
Open the tool window's Assembly tab. On the left is your practice/08/pointers.c.
&x becomes lea (load effective address): the variable's address is computed and its value is not read. swap(&x, &y) passes the function two addresses in rcx and rdx, not 3 and 8.*a is two steps. mov rax, QWORD PTR 16[rbp] takes the pointer itself (an 8-byte address), and mov eax, DWORD PTR [rax] the int it points to. Square brackets [...] in assembly are the *.QWORD (8 bytes) and an int a DWORD (4): the same numbers sizeof showed in step 1.*a = *b; is four instructions: take b, read *b, take a, write to *a.p++ in sum becomes add QWORD PTR ..., 4: a pointer to int moves not by 1 but by 4 bytes, one element.assert(a != NULL ...) is a comparison with 0: NULL is just the address 0.Switch to -O1: swap shrinks to a few instructions, and the pointers are kept in registers (rbx, rsi) without going through memory: *a is one instruction, mov eax, DWORD PTR [rbx].
C source pointers.c
x86-64 assembly -O0
x86-64 assembly -O1
Each one ticks itself when you do it.
All six done. You know your way around.
It is laid out like CLion: the same panels in the same places. This tour shows each one, and you can reopen it any time with Tour.
Switches the left panel: Lesson plan, Project files, Changes. Click the active icon again to hide the panel.
In CLion: the tool window bar runs down the left edge, too.
This part is not on this task: it appears when a task needs it.
Every task in this lesson. Now marks your place. Clicking a task only lets you look; it never moves your place. Project files and Changes open here too.
In CLion: this spot holds the Project view (the file tree).
This part is not on this task: it appears when a task needs it.
Opens the file for your task by itself. A tab appears for each file the step opens. The breadcrumbs above the code show the folder.
In CLion: the same editor tabs and breadcrumbs.
This part is not on this task: it appears when a task needs it.
Diff shows what changed, like git diff: red is the old code, green the new.
In CLion: the diff view in the Commit window looks the same.
This part is not on this task: it appears when a task needs it.
Terminal for build commands, Database to see your tables. They open by themselves when a task needs them. Drag the top edge to resize.
In CLion: Terminal, and the Database tool window.
This part is not on this task: it appears when a task needs it.
What to do now, right above the code, so you never miss it. Numbered notes in the code explain the important lines. Details shows what you should see and a hint.
In CLion: no equivalent: this is your lecturer's guide.
This part is not on this task: it appears when a task needs it.
Done is the only button that moves you forward. Look back lets you review without losing your place.
This part is not on this task: it appears when a task needs it.
Guided, Focus code or Floating. You can drag the panel edges too. Your layout is remembered for next time.
In CLion: you can also rearrange and hide tool windows.
This part is not on this task: it appears when a task needs it.
Six small missions. Each one ticks itself when you do it, so you know you have found everything.