1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #include <iostream> using namespace std; #define N 7 int fun(char s[],char a,int n){ int j; j=n; while(a<s[j]&&j>0)j--; return j; } int main(){ char s[N+1]; int k; for (k = 1; k <=N; k++) s[k]='A'+2*k+1; cout<<fun(s,'M',N)<<endl; } |
0 of 4 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
1、将第03行替换为”int N=7;”;程序正常运行( )。
2、将第13行去掉,程序编译错误。( )
3、程序会输出什么( )
4、在运行到第14行时,串s等于( )。