1.1 static 和 const 的作用
1.2? 解釋宏定義的作用
???#ifndef __FILE_H__
???#define __FILE_H__
???#endif //__FILE_H__
1.3 空間大小,WIN32平臺
???char *p = "Hello"
???int n = 100;
???sizeof(*p) = ?
???sizeof(p) = ?
???sizeof(n) = ?
2。內(nèi)存
2.1 簡述內(nèi)存區(qū)域的作用
???堆:
???棧:
???.DATA:
???.BSS:
???共享內(nèi)存:
2.2 找出內(nèi)存使用的問題
???(1) void GetMemory(char *p)
?????????{
????????????p = malloc(100);
?????????}
???(2) void GetMemory(char *p)
?????????{
???????????????char str[] = "Hello";
???????????????p = str;
?????????}
2.3 字節(jié)對齊的作用,比如4字節(jié)對齊
3。加上函數(shù)注釋
???FILE *fopen(const char *file, const char *mode);?
???size_t fread(char *Buffer, size_t BlockSize, size_t BlockNum, FILE *stream);
4。編寫函數(shù)
4。1 編寫二分查找算法
4。2 編寫鏈表棧
5。設(shè)計函數(shù),任選2題
5.1 把字符串反轉(zhuǎn)過來,如"ABCDE", 反轉(zhuǎn)后則變?yōu)?"EDCBA"
???void ReversString(char *string);
5.2 統(tǒng)計源代碼行數(shù),空行不算
5.3 編寫char *strncpy(char *sDst, const char *sSrc, int n);
???