Skip to content

Instantly share code, notes, and snippets.

@JeonghunLee
Last active November 16, 2016 01:50
Show Gist options
  • Save JeonghunLee/5d0bc64ccc6ce6882511d78297b12867 to your computer and use it in GitHub Desktop.
Save JeonghunLee/5d0bc64ccc6ce6882511d78297b12867 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int *aa[10]={0};
int (*bb)[10]={0};
int cc[10];
/*
Output
*aa[10]=40 byte (*bb)[10]=4 byte cc[10]=40 byte
*/
int main(void) {
int sz1,sz2,sz3;
sz1 = sizeof(aa);
sz2 = sizeof(bb);
sz3 = sizeof(cc);
printf(" *aa[10]=%d byte (*bb)[10]=%d byte cc[10]=%d byte \n",sz1,sz2,sz3);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment