+ 1

Can't understand the code.

This code is in C language tutorial. https://code.sololearn.com/c2R5IX58I7uG/?ref=app

19th Aug 2018, 6:43 PM
Dror Dahary
Dror Dahary - avatar
1 Odpowiedź
+ 1
Dror Dahary ptr = a in code is there... this assigns address of first elemnt of array to pointer... as * is dereferencing operator, *ptr prints value pointed by first elemnt of array... going ahead *(ptr+1) prints second element... *(ptr+2) prints third element and so on...
19th Aug 2018, 6:56 PM
Ketan Lalcheta
Ketan Lalcheta - avatar