设fp为指向某二进制文件的指针,且已读到此文件末尾,则函数feof(fp)的返回值为()。
A. EOF
B. 非0值
C. 0
D. NULL
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346500.html
点击查看答案
在调用函数时,如果实参是简单变量,它与对应形参之间的数据传递方式是()。
A. 地址传递
B. 单向值传递
C. 由实参传给形参,再由形参传回实参
D. 传递方式由用户指定
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e034650a.html
点击查看答案
表达式:10!=9的值是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346519.html
点击查看答案
有以下程序
#include
void num()
{ extern int x,y;
int a=15,b=10;
x=a-b;
y=a+b;
}
int x,y;
main()
{ int a=7,b=5;
x=a-b;
y=a+b;
num();
printf("%d,%d\n",x,y);
}
执行后的输出结果是( )。
A. 12,2
B. 5,25
C. 1,12
D. 输出不确定
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034651b.html
点击查看答案
有以下程序
#include
void ive(x,n)
int x[],n;
{ int t,*p;
p=x+n-1;
while(x{ t=*x;
*x++=*p;
*p--=t;
}
return;
}
void main()
{ int i,a[]={1,2,3,4,5,6,7,8,9,0};
ive(a,10);
for(i=0;i<10;i++)
printf("%d ",a[i]);
printf("\n");
}
执行后的输出结果是( )。
A. 1 2 3 4 5 6 7 8 9 0
B. 0 9 8 7 6 5 4 3 2 1
C. 1 3 5 7 9 2 4 6 8 0
D. 0 8 6 4 2 9 7 5 3 1
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034651e.html
点击查看答案
有以下程序
fun(int x)
{ int p;
if(x==0||x==1) return(3);
p=x-fun(x-2);
return p;
}
main()
{ printf("%d\n",fun(7)); }
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346510.html
点击查看答案
有以下程序
#include
void fun(int *s)
{ static int j=0;
do
{ s[j]+=s[j+1];
}while(++j<2);
}
void main()
{ int k,a[10]={1,2,3,4,5};
for(k=1;k<3;k++)
fun(a);
for(k=0;k<5;k++)
printf("%d",a[k]);
}
执行后的输出结果是( )。
A. 35756
B. 23445
C. 35745
D. 12345
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346518.html
点击查看答案
有以下程序
#include "stdio.h"
void main()
{ char s[12]= "a book";
printf("%.4s",s);
}
执行后的输出结果是( )。
A. a book!
B. a book![四个空格]
C. a bo
D. 格式描述错误,输出不确定
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e034650b.html
点击查看答案
#include
void main()
{
char str[]="\"stop!\",he said";
printf(str);
}
程序的运行结果是 ( )。
A. stop!
B. "stop!"
C. "stop",he said
D. he said*/
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034650a.html
点击查看答案
假定int类型变量占用两个字节,其有定义:int x[10]={0,2,4};,则数组x在内存中所占字节数是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346514.html
点击查看答案