633
pointers are very eleganto
(lemmy.world)
Post funny things about programming here! (Or just rant about your favourite programming language.)
char**So that you can have an array of strings. It's useful to remember that in C arrays and pointers are exactly the same thing, just syntax sugar for however you want to look at it. There are a few exceptions where this isn't true however:
&operatorsizeofalignofwhich decay is a no-nochar[]or wide literal ofwchar_t[], so likechar str[] = "yo mama";But
int**is just an array ofint*, which likewiseint*can just be an array ofint. In the picture here, we haveint** anyathat is an array ofint*with a size of 1,int* anyathat is an array ofintwith a size of 1, and then of course ourintthere being pointed to byint* anya.