8

! rant
I started to learn Matlab today. After I learnt that arrays starting with 1 in the Matlab, I started to think about why using 0 based arrays was made popular in the first place and I realized that C arrays actually just pointers and first element of the array is just a location pointed by array name. There is no need to add number to reach to the first element. After googling it, I saw that my assumption is true. Finding it all myself made me a little bit of proud 😀😀😀 Also, this expanded my horizon 🗻🗻🗻

Comments
  • 2
    Instead of writing arr[i], you can write *(arr+i) = *(i+arr) = i[arr]
    Found this on Stackoverflow two years ago 😆
  • 1
    Yep, brackets are like just make up 😂
Add Comment