#include <stdio.h> int main() { /*int ages[5]={12,3,3,45,56}; ages[1]=7;*/ // int ages[5]={12,3,6}; //int ages[]={12,3,6}; /*int count =5; int ages[count]={12,3,6};*/ /*int count =5; int ages[count]; ages[0]=7; ages[1]=7; ages[2]=27;*/ int ages[]={12,3,6}; int count = sizeof(ages)/4; for (int i =0; i<count; i++) { printf("ages[%d]=%d\n",i,ages[i]); } return 0; } |