以下程序的输出结果是_______。 #include<stdio.h> main() { printf("%d\n",NULL); }
A.不确定的(因变量无定义)
B.0
C.-1
D.1
第1题:
有以下程序 #include <stdio.h> main() { int n,*p=NULL; *p=&n; printf("Input n:");scanf("%d",&p);printf("output n:");printf("%d\n",p); } 该程序试图通过指针p为变量n读入数据并输出,但程序有多处错误,以下语句正确的是
A.int n,*p=NULL;
B.*p=&n;
C.scanf("%d",&p)
D.printf("%d\n",p);
第2题:
以下四个程序中,完全正确的是( )。
A.#include <stdio.h> main( ); { /* programmlng* / printf( "programming! \n" ); }
B.#include <stdio.h> main( ) { /*/programming printf("programming! \n"); }
C.#include <stdio.h> main( ) { /*programming* / printf( "programming! \n" ); }
D.include <stdio.h> main ( ) { /*/* programming*/*/ printf( "programming! \n" ); }
第3题:
以下四个程序中,完全正确的是( )。
A.#include<stdio.h>
B.#include<stdio.h> main(); main() {/*programming*/ {/*/programming/*/ printf("programming!\n");} printf("programming!\n");}
C.#include<stdio.h>
D.include<stdio.h> main() main() {/*/*programming*/*/ {/*programming*/ printf("programming!\n");} printf("programming!\n");}
第4题:
执行以下程序的输出结果是【 】。
include <stdio.h>
main()
[ int i, n[4]={1};
for(i= 1 ;i<=3 ;i++)
{ n[i]=n[i-1]*2+1; printf("%d",n[i]); }
第5题:
以下程序的输出结果是( )。
include<stdio.h>
fun()
{ int a=0;
a+=3;
printf("%d",A);
}
main()
{ int cc;
for(cc=1;cc<=4;cc++)
fun();
printf("\n");
}
第6题:
以下程序的输出结果是 【7】 。
#include "stdio.h"
main()
{int a=065;
printf( "%d\n",--a);
}
第7题:
以下程序的输出结果是( )。
include<stdio.h>
void fun(int x)
{ if(x/2>0)fun(x/2);
printf("%d",x);
}
main()
{fun(3);printf("\n");
}
第8题:
以下程序的输出结果是______。 main() {printf("%d\n",NULL); }
A.0
B.-1
C.1
D.不确定的值(因变量无定义)
第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没定义,出错