单选题有下列程序:
#include<Stdio.h>
int f(int n);
main()
{ int a=3,s;
s=f(A) ;s=s+f(A) ;printf("%d/n",s);
}
int f(int n)
{ static int a=1;
n+=a++;
return n;
}
程序运行后的输出结果是( )。
单选题设变量已正确定义并赋值,下列正确的表达式是( )。
单选题有以下程序: #include<stdio.h> main() int n=2,k=0; while(k++&&n++>2); printf("%d%d/n",k,n); 程序运行后的输出结果是( )。
单选题整型变量X和Y的值相等,且为非0值,则以下选项中结果为0的表达式是______。
A. X||Y
B. X|Y
C. X&Y
D. X^Y
单选题有以下程序main(int argc,char *argv[]){ int
n,i=0;while(argv[1][i]!='/0'){ n=fun();
i++;}printf("%d/n",n*argc);}int fun(){ static int
s=0;s+=1;return s;}假设程序编译、连接后生成可执行文件exam.exe,若键入以下命令exam
123〈回车〉则运行结果为
A. 6
B. 8
C. 3
D. 4
单选题设有以下说明语句: struct stu int a; float b; stutype; 则下面叙述不正确的是( )。
单选题以下函数的功能是( )。int fun(char*s){char*t=s;while(*t++);return(t一s);}
单选题以下说法正确的是______。
单选题若有定义语句char c='\101';则变量c在内存中占
单选题有以下程序 #include<stdio.h> main() {int a=1,b=2; while(a<6){b+=a;a+=2;b%=10;} printf("%d,%d、n",a,b); } 程序运行后的输出结果是( )。
单选题对下述程序的判断中,正确的是
____
。
#include<stdio.h>
void main()
{char *P,s[256];
p=s;
while(strcmp(s,"the end"))
{printf("Input the string:");
gets(s);
while(*P)
putchar(*p++);}}
单选题有以下程序:
#include<stdio.h>
#define f(x)x*x*x
main()
{
int a =3,s,t;
s=f(a+1);
t=f((a+1));
printf("%d,%d/n",s,t);
}
程序运行后的输出结果是______。
单选题下列关于栈的叙述中,正确的是( )。
单选题若有代数式(其中e仅代表自然对数的底数,不是变量),则以下能够正确表示该代数式的C语言表达式是______。A.sqrt(fabs(pow(n,x)+exp(x)))B.sqrt(fabs(pow(n,x)+pow(x,e)))C.sqrt(abs(n^x+e^x))D.sqrt(fabs(pow(x,n)+exp(x)))
单选题下列程序的输出结果是______。#include <stdio.h>main () int i=1,j=3; printf("%d,",i++); int i=0; i+=j*2; printf("%d,%d,",i,j); printf("%d,%d/n",i,j);
单选题有以下程序:
#include<stdio.h>
#define N 4
int fun(int a[][N])
{int i,y=0;
for(i=0;i<N;i++)
y+=a[1][i]+a[N-1][i];
for(i=0;i<N-1;i++)
a[i][i]=a[i][i] * a[i][i];
return y;
}
main()
{int y,x[N][N]={{11,21,13,4},
{15,6,17,8},
{9,1,11,12},
{3,4,15,6}};
y=fun(x);
printf("%d,%d,%d",y,x[N-3][N-3],x[N-3][N-2]);
}
程序执行后的输出结果是______。
单选题有以下程序段#include<stdio.h>main(){while(getchar()!="/n");}以下叙述中正确的是______。
单选题下面程序的运行结果是( )。 #include<stdio.h> void del(char*s) int i,j; char *a; a=s; for(i=0,j=0;a[i]!='/0';i++) if(a[i]>='0' j++; s[j]='/0'; main() char s[]="aa89gggh"; del(s); printf("/n%s",s);
单选题下述程序的输出结果是______。
#include<stdio.h>
void main()
{ char a=1,b=2;
char c=a^b<<2;
printf("/n%d",c);
}
单选题有以下函数:int fun(char*x,char*y){int n=0;while((*x==*y)&&*x!='\0'){x++;y++;n++:}return n:}函数的功能是( )。