有如下程序#include int disp(char* str){while (*str) putchar(*str++);return *str;}main(){printf("%d\n", disp("NAME"));}程序运行后的输出结果是
A. NAME0
B. NAMEE
C. NAME
D. NAME\0
查看答案
有如下程序#include main(){char *p, old_str[10] = "wind";int password;scanf("%d", &password);p = old_str;while (*p){printf("%c", *p + password);p++;}printf("\n");}程序运行时,从键盘输入2<回车>,输出结果是
A. ykpf
B. wind
C. xjoe
D. 2222
有如下程序#include int sum(int* array, int len){if (len == 0)return array[0];elsereturn array[0] + sum(array+1, len-1);}main(){int array[5] = {1,2,3,4,5};int res = sum(array, 4);printf("%d\n", res);}程序运行后的输出结果是
A. 15
B. 10
C. 8
D. 1
有以下程序#include void fun(int *x,int s,int e){ int i,j,t;for(i=s,j=e; i
A. 4567890123
B. 3210987654
C. 9876543210
D. 0987651234
有以下程序#include main(){ int s[3][2]={ 1,2,3,4,5,6},*ps[3],k;for(k=0;k<3;k++){ ps[k]=s[k];printf("%d ",*(ps[k]+1));}}程序的运行结果是
A. 2 4 6
B. 1 3 5
C. 1 2 3
D. 4 5 6