以下程序的输出结果为() #include "stdio.h" main( ){int a;for(a=0;a<10;a++);printf("%d",a);}
第1题:
下面程序的输出结果是( )。 include<stdio.h> main() {static char a[]="china"; char*ptr=a; while(*ptr) {printf("%c",*ptr-32); ptr++; } }
第2题:
以下程序的输出结果是( )。
include<stdio.h>
fun()
{ int a=0;
a+=3;
printf("%d",A);
}
main()
{ int cc;
for(cc=1;cc<=4;cc++)
fun();
printf("\n");
}
第3题:
以下程序的输出结果是 【7】 。
#include "stdio.h"
main()
{int a=065;
printf( "%d\n",--a);
}
第4题:
以下程序的输出结果是( ) #include<stdio.h> #include<string.h> main() {char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str)); }
A.6
B.7
C.11
D.12
第5题:
以下程序的输出结果是 ( ) # include<stdio.h> main( ) { int a,b; for(a=1,b=1,a<=50;a+ +) { if(b>=10) break; if (b%2==1) { b+=2; continue } b+=2; } printf("%d\n",a); }
A.4
B.5
C.6
D.7
第6题:
以下程序运行后的输出结果是( )。
include<stdio.h>
main()
{ int a=1, b=7;
do {
b=b/2; a+=b;
} while(b>1);
printf("%d\n",A);
}
第7题:
以下程序的输出结果是______。
include <stdio.h>
void swap(int *a, int *b)
{ int *t;
}
{ int i=3,j=5,*p=&i,*q=&j;
swap(p,q); printf("%d %d\n",*p,*q);
第8题:
以下程序运行后的输出结果是【 】
include <stdio.h>
main ( )
{ char a[] ="123456789", *p;
int i =0;
p=a;
while( * p)
{ if(i%2 ==0) *p='*';
p++;i++;
}
puts(a);
}
第9题:
有以下程序
#include <stdio.h>
main( )
{ printf("%d\n",NULL); }
程序运行后的输出结果是
A.0
B.1
C.-1
D.NULL没定义,出错
第10题:
有以下程序: #include<stdio.h> main() { printf("%d\n",NULL);} 程序运行后的输出结果是( )。
A.0
B.1
C.-1
D.NULL没定义,出错