Hi I'm stuck wondering how an array assignment is legal.
num[i] equals *( num + i) equals *(i + num ) equals i[num]
It's the last assignment I'm unsure about, how can example 1[num] equals num?
There is some grave lacking in my understanding about the C language, perhaps this is quite known logic?
Can somebody give me a reference to read up on when it comes to this specifically?
Oh yeah right. The square brackets are syntactic sugar for *(address + offset). So doing i[num] is like saying *(offset + address) which leads to dereferencing the same memory address as the first one.