Skip to content

Instantly share code, notes, and snippets.

@HappyCerberus
Created September 25, 2012 08:53
Show Gist options
  • Save HappyCerberus/3780717 to your computer and use it in GitHub Desktop.
Save HappyCerberus/3780717 to your computer and use it in GitHub Desktop.
Array (for stackoverflow)
#include <stdio.h>
int main()
{
int x[][3] = { { 1, 2, 3}, {1, 2, 3}};
int (*xptr)[3] = x;
for (int i = 0; i < 2; i++)
for (int j = 0; j < 3; j++)
printf("%d ",xptr[i][j]);
printf("\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment