外企C语言笔试题
- 考研
- 关注:9.06K次
1、作为开发团队的一员,你需要实现一些库函数提供给其他人使用。
假设你实现的一个函数原型如下:
int DoSomeThing(char* pParam)
{
…
}
2、下面的`代码有什么问题?
char *_strdup( const char *strSource )
{
static char str[MAX_STR_LEN];
strcpy(str, strSource);
return str;
}
/* [in] pszFullPath 全路径文件名
[out] pszPathName 接收全路径的缓冲区
[out] nCount 缓冲区大小
*/
int ExtractFilePath(char* pszFullPath, char* pszPathName, int nCount)
{
…
}
- 文章版权属于文章作者所有,转载请注明 https://m.leqiuxue.com/kywx/1ky1oe.html