2015年11月23日 星期一

[C][Pointer][Book] Understanding and Using C Pointer


pci is a variable const int *pci
pci is a pointer variable const int *pci
pci is a pointer variable to an integer const int *pci
pci is a pointer variable to a contant integer const int *pci


int *pi = calloc(5,sizeof(int));

int *pi = malloc(5*sizeof(int));
memset(pi,0,5*sizeof(int));
Above two sentence are the same.



Reference:
  • [book] Understanding and Using C Pointers

Related Posts:

0 意見:

張貼留言