C++隨筆 之 C++測試題目
下面這段代碼的輸出是多少(在32位機上).
??? char *p;
??? char *q[20];
??? char *m[20][20];
??? int (*n)[10];
??? struct MyStruct
??? {
????? char dda;
????? double dda1;
????? int type ;
??? };
??? MyStruct k;
??? printf("%d %d %d %d %d",sizeof(p),sizeof(q),sizeof(m),sizeof(n),sizeof(k));
??? char *p;
??? char *q[20];
??? char *m[20][20];
??? int (*n)[10];
??? struct MyStruct
??? {
????? char dda;
????? double dda1;
????? int type ;
??? };
??? MyStruct k;
??? printf("%d %d %d %d %d",sizeof(p),sizeof(q),sizeof(m),sizeof(n),sizeof(k));
posted on 2006-12-25 13:42 木木頭 閱讀(492) 評論(4) 編輯 收藏 引用 所屬分類: C++特性