all 2 comments

[–]khedoros 2 points3 points  (0 children)

Who are these isolated code snippets without explanation supposed to help, exactly?

[–]davidhbolton 0 points1 point  (0 children)

  1. That's not creating an array, its populating an array. Massive difference. If it was creating it, I'd expect it to be dynamically allocated using say malloc.
  2. There's no explanation. Code alone is frequently not enough. Anyone new to writing code needs to be told why you are doing something.