Skip to content

Instantly share code, notes, and snippets.

@webgtx
Created March 14, 2022 10:36
Show Gist options
  • Save webgtx/7ddeb0c0f24f6ff4995391b213566542 to your computer and use it in GitHub Desktop.
Save webgtx/7ddeb0c0f24f6ff4995391b213566542 to your computer and use it in GitHub Desktop.
Arrays & pointer in C
int main() {
int arr[5] = {3, 5, 4, 7}, idx;
for (idx = 0; idx < 5; idx++)
printf("item addr: %i | %p \n", *(arr + idx) ,arr + idx);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment