申请一个m行n列的整型的二维动态数组,可以使用下面的哪条语句?
A. p = (int *) malloc(m*n*sizeof(int));
B. p = (int *) malloc(m*n, sizeof(int));
C. int p[m][n];
以下程序的输出结果是_____________________int fun(char s[]) { int n=0; while(*s<='9'&&*s>='0') {n=10*n+*s-'0';s++;} return(n); } int main() { char s[10]={'1','3','4','*','2','9','*','0','*'}; printf("%d\n",fun(s)); return 0;}
以下程序的输出结果是#include void select(char *s){int i,j;char *t;t = s;for(i = 0,j=0;*(t+i)!='\0';i++)if(*(t+i)>='0'&&*(t+i)<='9'){*(s+j)=*(t+i);j++;}*(s+j) = '\0';}int main(){char str[] = "china 1949.10";select(str);printf("%s",str);return 0;}
以下程序在win32平台下的运行结果是#include int fun(int a[],int n){int i,r = 1;for(i = 0;i<=n;i++)r = r*a[i];printf("%d ",sizeof(a));return r;}int main(){int x,a[5] = {4,3,2,1,0};x = fun(a,3);printf("%d",x);return 0;}