单项选择题
有以下程序:
#include <stdio.h>
void fun(int n)
{ int i;
if((i=n/10)!=0)
fun(i);
putchar(n%10+"0");
}
main()
{ fun(256); }
程序运行后的输出结果是______。
- A.256
B.652
C.2560
D.52
点击查看答案&解析
相关考题
-
单项选择题
有以下程序:#include <stdio.h>main(){ int findmax(int,int,int),m;┋m=findmax(a,b,e);┋}int findmax(int x,int y,int z){ … }则以下叙述正确的是______。
A.在main函数中声明了findmax函数
B.在main函数中定义了findmax函数
C.在main函数中两次调用了findmax函数
D.在main函数内、外重复定义了findmax函数 -
单项选择题
有以下程序:#include <stdio.h>int fun(char *s){ char *p=s;while(*p !="\0")p++;return(p-s);}main(){ char *p="01234";printf("%d\n",fun(p));}程序的运行结果是______。
A.3
B.6
C.4
D.5 -
单项选择题
有以下程序:#include <stdio.h>main(){ char s[10]="verygood", *ps=s;ps+=4;ps="nice";puts(s);}程序的运行结果是______。
A.nice
B.verynice
C.nicegood
D.verygood