以下程序的运行结果是 ( ) #definePI 3.141593 #include<stdio.h> main( ) { printf("PI=%fn",PI); }
A.3.141593=3.141593
B.PI=3.141593
C.3.141593=PI
D.程序有误,无结果
第1题:
以下程序运行后的输出结果是( )。
include<stdio.h>
main()
{ int x=20;
printf("%d", 0<x<20);
printf("%d\n", 0<x && x<20);
}
第2题:
有以下程序: #include <stdio.h> #include <string.h> main() { char str[][20]={"Hello","Beijing"},*P=str[0]; printf("%d\n",strlen(p+20)); } 程序运行后的输出结果是( )。
A.0
B.5
C.7
D.20
第3题:
以下程序运行后的输出结果是。 #include<stdio.h> main() {int a=200,b=010; printf("%d,%dn",a,b); }
第4题:
有以下程序: #include < stdio. h > main( ) { ehar str[ ] [10] = { "China" ," Beijing" } , * p = str[o]; printf( "% s \n", p + 10); }程序运行后的输出结果是( )。
A.China
B.Beijing
C.ng
D.ing
第5题:
以下程序运行后的输出结果是() 。 #include <stdio.h> #include <stdlib.h> #include <string.h> main() { char *p; int i; p=(char *)malloc(sizeof(char)*20); strcpy(p,"welcome"); for(i=6;i>=0;i--) putchar(*(p+i)); printf("n"); free(p); }