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。內存
2.1 簡述內存區域的作用
???堆:
???棧:
???.DATA:
???.BSS:
???共享內存:
2.2 找出內存使用的問題
???(1) void GetMemory(char *p)
?????????{
????????????p = malloc(100);
?????????}
???(2) void GetMemory(char *p)
?????????{
???????????????char str[] = "Hello";
???????????????p = str;
?????????}
2.3 字節對齊的作用,比如4字節對齊
3。加上函數注釋
???FILE *fopen(const char *file, const char *mode);?
???size_t fread(char *Buffer, size_t BlockSize, size_t BlockNum, FILE *stream);
4。編寫函數
4。1 編寫二分查找算法
4。2 編寫鏈表棧
5。設計函數,任選2題
5.1 把字符串反轉過來,如"ABCDE", 反轉后則變為 "EDCBA"
???void ReversString(char *string);
5.2 統計源代碼行數,空行不算
5.3 編寫char *strncpy(char *sDst, const char *sSrc, int n);
???