void gettime(char tmp[]) {printf("sizeof(tmp)2=[%d]\n", sizeof(tmp));}main() {...char tmp[10];printf("sizeof(tmp)1=[%d]\n", sizeof(tmp));gettime(tmp);}為什么sizeof(tmp)1打印10,sizeof(tmp)2打印4呢?那如何讓gettime中傳入的tmp字符串也是10個字符空間呢?謝謝!
- 2 回答
- 0 關注
- 392 瀏覽