initial checkin from subversion
This commit is contained in:
30
struct2.c
Normal file
30
struct2.c
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <stdio.h>
|
||||
|
||||
struct a
|
||||
{
|
||||
int a1;
|
||||
} ;
|
||||
|
||||
struct b
|
||||
{
|
||||
int b1;
|
||||
struct a b2[1000];
|
||||
} ;
|
||||
|
||||
int main()
|
||||
{
|
||||
struct b sb;
|
||||
|
||||
sb.b1=1;
|
||||
sb.b2[0].a1=2;
|
||||
sb.b2[1].a1=3;
|
||||
sb.b2[2].a1=4;
|
||||
sb.b2[3].a1=5;
|
||||
|
||||
printf("+%d :\n",sb.b1);
|
||||
printf(" -%d:\n",sb.b2[0].a1);
|
||||
printf(" -%d:\n",sb.b2[1].a1);
|
||||
printf(" -%d:\n",sb.b2[2].a1);
|
||||
printf(" -%d:\n",sb.b2[3].a1);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user