Skip to content

Instantly share code, notes, and snippets.

@ymollard
Created January 25, 2018 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymollard/0df5fea5bdeaed5e18b41ec978f3e982 to your computer and use it in GitHub Desktop.
Save ymollard/0df5fea5bdeaed5e18b41ec978f3e982 to your computer and use it in GitHub Desktop.
Declare arrays for subscript operator in C
size_t len = 10;
int (*arr)[100][3] = malloc(len * sizeof *arr);
arr[9][99][2] = 123;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment