DSP

malloc 的使用

2019-07-13 15:06发布

#include #include int main() { char *pt = malloc(16); if(pt==NULL) return 1; for(int i=0; i<16; i++){ *(pt+i) = (char) i; } for(int i=0; i<16; i++) printf("%x ", *(pt+i)); free(pt); return 0; }