以下程序的输出结果是_________#include int main(){int a[3][3]= { {1,2},{3,4},{5,6} },i,j,s=0;for(i=1; i<3; i++)for(j=0; j<=i; j++)s+=a[i][j];printf("%d\n",s);return 0;}
查看答案
以下定义语句中,错误的是___________
A. int a[]={1,2};
B. char *a[3];
C. char s[10]="test";
D. int n;float a[n];
以下程序的输出结果是________#include char cchar(char ch){if(ch>='A'&&ch<='Z') ch=ch-'A'+'a';return ch;}int main(){char s[]="ABC+abc=defDEF",*p=s;while(*p){*p=cchar(*p);p++;}printf("%s\n",s);return 0;}
A. abc+ABC=DEFdef
B. abc+abc=defdef
C. abcaABCDEFdef
D. abcabcdefdef
以下程序调用findmax函数返回数组中的最大值。#include findmax(int *a,int n){int *p,*s;for(p=a,s=a; p-a
A. p>s
B. *p>*s
C. a[p]>a[s]
D. p-a>p-s
以下程序的输出结果是________#include int main(){char ch[3][5]= {"AAAA","BBB","CC"};printf("\"%s\"\n",ch[1]);return 0;}
A. "AAAA"
B. "BBB"
C. "BBBCC"
D. "CC"