技巧题
试题1:请写一个C 函数,若处理器是
Big_endian 的,则返回0;若是Little_endian 的,则
返回1
查看答案
试题6:
void GetMemory(char **p, int num )
{
*p = (char *) malloc(num );
}
void Test(void )
{
char *str = NULL;
GetMemory(&str, 100 );
strcpy(str, "hello" );
printf(str );
试题8:请说出static和const关键字尽可能多
的作用
试编写函数判断计算机的字节存储顺序是开序
(little endian)还是降序(bigendian)
找错题
试题1:
void test1()
{
char string[10];
char* str1 = "0123456789";
strcpy(string, str1 );
}