题目内容

试题5:
char *GetMemory(void )
{
char p[] = "hello world";
return p;
}
void Test(void )
{
char *str = NULL;
str = GetMemory();
printf(str );
}

查看答案
更多问题

技巧题
试题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)

答案查题题库