0

Q about C pointers on pointers.

An awesome example from the challenge. What is the type of p5 pointer and how long does it continue? https://code.sololearn.com/c8rRs6E4BECQ/?ref=app

15th May 2019, 4:06 PM
Imil Familiev
Imil Familiev - avatar
5 Respuestas
+ 1
5x pointer of pointer of int. You can do this as many times as you want. But that is useless, although possible.
15th May 2019, 4:10 PM
Daniel Adam
Daniel Adam - avatar
+ 1
~ swim ~ More closely to hardware more magic becomes for me. Assembler is incantation.
15th May 2019, 7:03 PM
Imil Familiev
Imil Familiev - avatar
0
This all works good. printf("%d\n",*****p5); printf("%d\n",*(****p5)); printf("%d\n",****(*p5)); What's this?
15th May 2019, 4:18 PM
Imil Familiev
Imil Familiev - avatar
0
More over, this also works good. int* q1 = &a; int* q2 = &q1; int* q3 = &q2; int* q4 = &q3; int* q5 = &q4; printf("%d",*****((int*****)q5));
15th May 2019, 6:23 PM
Imil Familiev
Imil Familiev - avatar
0
~ swim ~ This approves duck test lol. Think its just pointers. The magic lies in the order of referencing and dereferencing operations.
15th May 2019, 6:50 PM
Imil Familiev
Imil Familiev - avatar