第五章
数组名代表数组的首地址。
答案:对
一个数组可以存储不同类型的数据。若有定义:int a[10];,使用数组元素时,下标的最小值是1,最大值是10。下面程序的运行结果是______。#include "stdio.h"void main(){ int a[5],i; for(i=0;i < 5;i++) { a[i]=9*(i-2+4* ( i > 3)) % 5; printf("%2d",a[i]); }}下面程序的运行结果是______。#include "stdio.h"void main(){ int a[3][3]={1,2,3,4,5,6,7,8,9},i; for(i=0; i < = 2; i++) printf("%d ",a[i][2-i]);}C89标准中,数组在定义时可以不指定数组的长度,可根据程序中实际使用的元素个数决定。

温馨提示支付 ¥3.00 元后可查看付费内容,请先翻页预览!
点赞(0) dxwkbang
返回
顶部