0

次のコード スニペットが機能します。

main( )
{
    struct book
    {
        char name[20];
        int noof;
        float prices;
    };
    struct book b={0};
    printf("%d %f", b.noof, b.prices);
}

ここでは、Iname[ ]は 0 に初期化されています。しかし、次のコード スニペットは機能しません。

   main( )
   {
    char c[ ]=0;
    printf("%c", c[0]);
   }    
4

1 に答える 1