全部知识点
第3241题
有以下程序
#include<stdio.h> main() {int a=1,b=0; if(!a) b++; else if(a==0)if(a)b+=2; else b+=3; printf(”%d\n”,b); }
程序运行后的输出结果是
第3242题
若有定义语句int a, b;double x;则下列选项中没有错误的是
第3243题
有以下程序
#include <stdio.h>
main()
{int a=1,b=2;
while(a<6){b+=a;a+=2;b%=10;}
printf(”%d,%d\n”,a,b);
}程序运营后的输出结果是
第3244题
有以下程序
#include<stdio.h> main() {int y=10; while(y--); printf(”Y=%d\n”,Y); }
程序执行后的输出结果是
第3245题
有以下程序
#include<stdio .h> main() {char s[」=”rstuv"; printf(”%c\n”,*s+2); }
程序运营后的输出结果是
第3246题
有以下程序
#include<stdio.h> #include<string.h> main() {char x[]=”STRING”; x[0」=0;x[1]=’\0’;x[2」=’0’; printf(”%d %d\n”,sizeof(x),strlen(x)); }
程序运营后的输出结果是
第3247题
有以下程序
#include<stdio.h> Int f(int x); main() {int n=1,m; m=f(f(f(n)));printf(”%d\n”,m); } int f(int x) {return x*2;}
程序运营后的输出结果是
第3248题
以下程序段完全对的的是
第3249题
有定义语句:int *p[4];以下选项中与此语句等价的是
第3250题
下列定义数组的语句中,对的的是
第3251题
若要定义一个具有5个元素的整型数组,以下错误的定义语句是
第3252题
有以下程序
#include<stdio.h> void f(int *p); main() {int a[5]={1,2,3,4,5},*r=a; f(r);printf(”%d\n”;*r); } void f(int *p) {p=p+3;printf(”%d,”,*p);}
程序运营后的输出结果是
第3253题
有以下程序(函数fun只对下标为偶数的元素进行操作)
# include<stdio.h> void fun(int*a;int n) {int i、j、k、t; for (i=0;i<n一1;1+=2) {k=i;‘ for(j=i;j<n;j+=2)if(a[j]>a〔k])k=j; t=a〔i];a〔i]=a[k];a〔k]=t; } } main() {int aa「10」={1、2、3、4、5、6、7},i; fun(aa、7); for(i=0,i<7; i++)printf(”%d,”,aa[i])); printf(”\n”); }
程序运营后的输出结果是
第3254题
下列选项中,可以满足“若字符串s1等于字符串s2,则执行ST"规定的是
第3255题
以下不能将s所指字符串对的复制到t所指存储空间的是
第3256题
有以下程序( strcat函数用以连接两个字符串)
#include<stdio.h> #include<string .h> main() {char a[20]=”ABCD\OEFG\0”,b[]=”IJK”; strcat(a,b);printf(”%s\n”,a); }
程序运营后的输出结果是
第3257题
有以下程序,程序中库函数islower (ch)用以判断ch中的字母是否为小写字母
#include<stdio.h> #include<ctype.h> void fun(char*p) {int i=0; while (p[i]) {if(p[i]==’ ’&& islower(p「i-1」))p[i-1]=p[i-1]-‘a’+‘A’; i++; } } main() {char s1[100]=”ab cd EFG!”; fun(s1); printf(”%s\n”,s1); }
程序运营后的输出结果是
第3258题
有以下程序
#include<stdio.h> void fun(int x) {if(x/2>1)fun(x/2); printf(”%d”,x); } main() {fun(7);printf(”\n”);}
程序运营后的输出结果是
第3259题
有以下程序
#include<stdio.h> int fun() {static int x=1; x+=1;return x; } main() {int i;s=1; for(i=1;i<=5;i++)s+=fun(); printf(”%d\n”,s); }
程序运营后的输出结果是
第3260题
有以下程序
#inctude<stdio.h>
#include<stdlib.h>
main()
{int *a,*b,*c;
a=b=c=(int*)malloc(sizeof(int));
*a=1;*b=2,*c=3;
a=b;
printf("%d,%d,%d\n",*a,*b,*c);
}程序运行后的输出结果是