单选题若有数组定义:char array[]="China";,则数组array所占的空间为______。
A.4个字节
B.5个字节
C.6个字节
D.7个字节
单选题根据下列的定义,能打印出字母P的语句是( )
struct stu {char name[10];
int age;
};
stmct stu s[10]={"John",11,
"Paul",12,
"Mary",11,
"adam",12
}:
单选题若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。 Struct stu inti; intname; st,*#p; p=
单选题有如下程序: main() { int k=4, n=0; for(; n<k; ) { n++; if(n% 3!=0)continue; k--; } printf(" % d, % d/n", k, n); 程序运行后的输出结果是______。
单选题假定当前盘符下有两个如下文本文件: 文件名 a1.txt a2.txt 内容 123# 321# 则下面程序段执行后的结果为 #include "stdio.h" void fc(FILE *p) { char c; while((c=fgetc(p))!='#')putchar(c);} main() { FILE *fp; fp=fopen("a1.txt","r"); fc(fp); fclose(fp); fp=fopen("a2.txt","r"); fc(fp); fclose(fp); putchar('/n');}
单选题下列程序的输出结果是( )。
#inc1ude
void main()
{int a=0,b=1,c=2;
if(++a>0||++b>0)
++c;
printf("%d,%d,%d",a,b,c);
}
单选题有下列程序: #include<stdio.h> main() {FILE*fp;int a[10]={1,2,3,0,0},i; fp=fopen("d2.dat","wb"); fwtite(a,sizeof(int),5,fp); fwrite(a,sizeof(int),5,fp); fclose(fp); fp=fopen("d2.dat","rb"); fread(a,sizeof(int),10,fp); fclose(fp); for(i=0;i<10;i++)printf("%d",a[i]); }程序的运行结果是
单选题下述程序的输出结果是______。
#include<stdio.h>
void main()
{char a=1,b=2;
char c=a^b<<2;
printf("/n%d",c);}
单选题在循环队列数据结构中,下列叙述中正确的是( )。
单选题C语言结构体类型变量在程序运行期间( )。
单选题已经定义ch为字符型变量,以下赋值表达式中错误的是______。A) ch='/' B) ch=62+3 C) ch=NULL D) ch='/xaa'
单选题若定义:int a=511, *b=,则printf("%d/n", *b);的输出结果为______。
单选题以下程序的功能是计算:。#include<stdio.h>main(){intn;floats;s=1.0;for(n=10;n>1;n--)s=s+1/n;printf("%6.4f/n",s);}程序运行后输出结果错误,导致错误结果的程序行是{{U}}{{/U}}。A.s=1.0;B.for(n=10;n>1;n--)C.s=s+1/n;D.printf("%6.4f/n",s);
单选题设有语句char a='\72';则变量a______。
单选题阅读以下程序段,其中表达式((p++)+1)->m的值是______。structS{intm;int*q;};inta[6]={1,2,3,4,5,6};structSn[3]={2,p=n;((p++)+1)->m;
单选题有以下程序
#include
main()
{struct STU{char name[9];char sex;double score[2]; };
struct STU a={"Zhao",m'',85.0,90.0},b={"Qian",f'',95.0,92.0};
b=a:
printf("%s,%c,%2.0f,%2.0f\n",b.name,b.sex,b.score [0],b.score[1]);
}
程序的运行结果是
单选题有以下程序: #include<stdio.h> main() int a[]=1,2,3,4,y,*p=&a[3]; --p;y=*p;printf("y=%d/n",y); 程序的运行结果是______。 A) y=0 B) y=1 C) y=2 D) y=3
单选题下面描述中正确的是______。
单选题下面程序段的运行结果是( )。 char a[]="abcdefgh";
char *p=a; p+=3;
printf("%d/n",strlen(strcpy(p,"ABCD")));
A. 8
B. 12
C. 4
D. 7
单选题C语言中char类型数据占字节数为