1
Reply

hai ,WHAT IS TYPEDEF

N  RATNAKAR

N RATNAKAR

17y
4.4k
0
Reply

    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