其他分享
首页 > 其他分享> > CS61C Project1

CS61C Project1

作者:互联网

PartA

PartA1

using pointer to pointer impl 2D array

int **pp = malloc(sizeof(int*)*row);
for (int i =0;i < col;i++)
    pp[i] = malloc(sizeof(int)*col);

this snippet occurs frequently, but what difference between pp[0] and pp?
as we all know the array name is equivalent with the first element in array.

free() priority

linux command diff

scanf

PartA2

PartB

标签:pp,int,pointer,CS61C,malloc,array,Project1,sizeof
来源: https://www.cnblogs.com/ijpq/p/15405098.html