单选题有以下程序 #include <stdio.h> main() FILE*pf, char *s1="China",*s2="Beijing"; pf=fopen("abc.dat","wb+"); fwrite(s2,7,1,pf); rewind(pf); /*文件位置指针回到文件开头*/ fwrite(s1,5,1,pf); fclose(pf); 以上程序执行后abc.dat文件的内容是______。 A) China B) Chinang C) ChinaBeijing D) BeijingChina
单选题下列方法中,不属于软件调试方法的是( )。
单选题有以下程序
#include <stdio.h>
#include <string.h>
struct A
{ int a;char b[10];double c;};
void f(struct A t);
main()
{ struct A a={1001,"ZhangDa",1098.0};
f(a); printf("%d,%s,%6.1f/n",a.a,a.b,a.c);
}
void f(struct A t)
{ t.a=1002;strcpy(t.b,"ChangRong");t.c=1202.0;}
程序运行后的输出结果是______。
单选题有以下定义和语句:struet worker8{int num;char name[20];char c;struet{int day;int month;int year;}s;};struct workers w,*pw;pw=&w:能给w中year成员赋1980的语句是( )。
单选题以下程序的输出结果是______。 main() printf("%d/n",NULL);
单选题对存储器按字节进行编址,若某存储器芯片共有10根地址线,则该存储器芯片的存储容量为
A)1KB
B)2KB
C)4KB
D)8KB
单选题C语言程序的执行是______。
单选题请读程序段: char str[]="ABCD",*p=str,
printf("%d/n",*(p+4)); 程序段的输出结果是______。
A. 68
B. 0
C. 字符'D'的地址
D. 不确定的值
单选题有如下程序 main() int y=3,x=3,z=1; printf("%d/n",(++x,y++),z+2); 运行该程序的输出结果是_____。
单选题有以下程序: #include <stdio.h> int fun(int x[], int n) static int sum=0, i; for(i=0; i<n; i++) sum+=x[i]; return sum; main() int a[]=1, 2, 3, 4, 5, b[]=6, 7, 8, 9, s=0; s=fun(a, 5) +fun(b, 4); printf("%d/n", s); 程序执行后的输出结果是( )。 A) 45 B) 50 C) 60 D) 55
单选题如下程序的输出结果是______。
#include<stdio.h>
main()
{char ch[2][5]={"1234","5678"},*p[2];
int i,j,s=0;
for(i=0;i<2;i++)
p[i]=ch[i];
for(i=0;i<2;i++)
for(j=0;p[i][j]>"/0";j+=2)
{s=p[i][j]-"0";
printf("%d",s);}
}
单选题有以下程序
main(int argc,char * argv[])
{int n=0,i;
flor(i=l;i
单选题下面程序的输出结果是 #include<stdio.h> #include<string.h> main() char *p1="abc",*p2="ABC",str[50]="xyz"; strcpy(str+2,strcat(p1,p2)); printf("%s/n",str);
单选题以下程序的输出结果是______。 #include <stdio.h>
main() { int i; for(i=1; i<=5; i++)
{ if(i% 2) putchar('<'); else continue;
putchar ('>'); } putchar ('#');
}
A.< > < > < >#
B.> < > < > <#
C.< > < >#
D.> < > <#
单选题若要对a进行++运算,则a应具有下面说明
单选题若有定义和语句: int**pp,*p, a=20,b=1O; pp= p= p= printf ("%d,%d/n",*p,**pp); 则输出结果是( )。
单选题有以下程序:
# include <stdio.h>
main()
{ int a=2,b;
b=a<<2; printf("%d/n",b);
}
程序运行后的输出结果是______。
单选题若有说明语句:int a,b,c,* d=&c;,则能正确从键盘读入三个整数分别赋给变量a、b、d的语句是 ( )
单选题有以下程序: #include <stdio.h> main( ) { int num[4][4]={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13;14,15,16}},i,j; for(i =0;i<4;i ++ ) { for(j=0;j<=i;j++)printf("%4c","); for(j=______;j<4;j ++ )printf( "%4d" ,hum[i] [j] ); printf(" /n" ); } } 若要按以下形式输出数组右上半三角; 1 2 3 4 6 7 8 11 12 16则在程序下划线处应填入的是( )。
单选题在标准C语言中,下列程序的输出结果为______。 main () printf ("%e", 123. 456);