单项选择题
有以下程序段 int a[10]={1,2,3,4,5,6,7,8,9,10},*p=&a[3],b; b=p[5]; b中的值是( )。
A.5
B.6
C.8
D.9
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序#includemain(){FILE * fp;int k , n,a[6]={1,2,3,4, 5,6};fp=fopen( d2.dat , W );fprintf(fp, %d%d%d\n ,a[0],a[1],a[2]);fprintf(fp, %d%d%d\n ,a[3],a[4],a[S]);fclose(fp);fp=fopen( d2.dat , r );fscanf(fp, %d%d ,&k,.&n);printf( %d%d\n ,k,n);fclose(fp);} 程序运行后的输出结果是【 】。
A.12
B.14
C.1234
D.123 456
点击查看答案&解析
单项选择题
以下选项中不能正确把c1定义成结构体变量的是( )。
A.typedef struct { int red; int green; int blue; } COLOR; COLOR cl;
B.struct color cl { int red; int green; int blue; }
C.struct color { int red; int green; int blue; } cl;
D.struct { int red; int green; int blue; } cl;
点击查看答案
相关试题
有以下程序:void swap1(int c[ ])...
有以下程序#include main(){struct S...
执行以下程序后,test.txt文件的内容是【...
有以下程序(提示:程序中fseek(fp,-2L...
有以下程序#includemain(){FILE * f...