> ~ Online tutorial


Scope
Both structure types and structure variables obey the rules of scope: that is to say, a structure type declaration can be local or global, depending upon where the declaration is made. Similarly if a structure type variable is declared locally it is only valid inside the block parentheses in which it was defined.
main ()

{ struct ONE

    {
    int a;
    float b;
    };

  struct ONE x;

}

function ()

{ struct ONE x;        /* This line is illegal, since ONE */
                        /* is a local type definition      */
                        /* Defined only in main()          */
}

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: