N  RATNAKAR
hai ,WHAT IS TYPEDEF
By N RATNAKAR in ASP.NET on Jan 23 2007
  • Gurjinder Singh Brar
    Jan, 2007 25

    Every variable has a data type. In C, C++ language typedef keyword is used to define new data type names to make a program more readable to the programmer. typedef declaration does not create types. It creates synonyms for existing types, or names for types that could be specified in other ways. For Example

    typedef struct club 
    {
    char name[30];
    int size, year;
    } GROUP;
    

    This statement declares GROUP as a structure type with three members. Since a structure tag, club, is also specified, either the typedef name (GROUP) or the structure tag can be used in declarations.

    Another Example:
    typedef enum {FALSE=0, TRUE} Boolean;
    void main ()
    {
    Boolean flag = TRUE;
    }
    

    Thanks
    Gurjinder Singh Brar
    http://dotnet-question-answer.blogspot.com

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS