C语言之所以命名为C,是由于C语言源自Ken Thompson创造的B语言,而B语言则源自BCPL语言。下面我给大家共享C语言开发工程师笔试题的内容,期望能够关怀大家,欢迎阅读!
C语言开发工程师笔试题
1、改错
如下程序能不能正确输出,假如不能,让他正确输出hello字符串。
void New(char 星符号 p) { p = new char[5]; } void main { char星符号 p = NULL; New(p); strcpy(p, hello); printf(%s, p); }
2、排列算法
一个数组{3,4,5,6,3},请输出这个数组的全排列,比方34563、43563、33456...。
#include
#include
template
void Print(T星符号 tArray, int iSize)
{for(int i = 0; i iSize; ++i)
{std::cout tArray[i] ;
}std::cout std::endl;
}template
void Permutation(T星符号 tArray, int iSize ...
附件列表