欢迎来到贱贱的博客

扩大
缩小

c语言typedef之数组运用

 1 #include <stdio.h>
 2 #include <stdlib.h>
 3 
 4 typedef int arr[4];//int arr[4]取一个别名 arr b c就是int b[4] int c[4]
 5 
 6 int main3()
 7 {
 8 
 9     arr b = {1,2,3,4},c={1,2,3,4};
10     int i;
11     for(i=0;i<4;i++)
12     {
13         printf("b[%d]=%d\tc[%d]=%d",i,b[i],i,c[i]);
14     }
15     system("pause");
16     return 1;
17 }

 

posted on 2016-11-07 15:18  L的存在  阅读(910)  评论(0编辑  收藏  举报

导航