• Saturday, March 7, 2015

    union and struct in C - C Programming

    Syed Masoom Rizvi
    What is union and struct in C Language? What is the difference between union and struct?

    What is struct?

    struct is an user-defined data type which stores heterogeneous types of data. struct is a combination of primitive (predefined) data types which are called as member of struct. These member can be access by using  struct variable with period "." following by the member name.

    Syntax: