柔性数组输出问题
#include<stdio.h>
#include<malloc.h>
typedef struct str
{
int len;
int array[];
}Softarray;
int main()
{
int i;
Softarray* str=(Softarray*)malloc(sizeof(Softarray)+sizeof(int)*20);
str->len=20;
str->array[0]=1;
str->array[1]=1;
for(i=1;i<str->len;i++)
{
str->array[i]=str->array[i-1]+str->array[i-2];
}
printf("%d\n",str->array[-1]);