Thread: Difference between Structures and Unions

  1. #1
    Registered User
    Join Date
    Aug 2014
    Location
    Chennai
    Posts
    1

    Difference between Structures and Unions

    Hi every one..I am new to programming..Can any one tell me the difference between structures and unions in C

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Search the Web concerning C structs and unions. Should you still have questions, come back here to pose a specific question for clarification.

  3. #3
    Registered User
    Join Date
    Aug 2014
    Posts
    15
    Unions do one or the other structures do all. Structures allocate memory for the largest possible. Unions are useful when it's an either or. Both are accessed the same way, but as laserlight said Google is the answer.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Structures and unions
    By frktons in forum C Programming
    Replies: 1
    Last Post: 07-30-2010, 08:47 AM
  2. Replies: 6
    Last Post: 09-21-2008, 04:18 PM
  3. Structures - Unions
    By AProg in forum C Programming
    Replies: 16
    Last Post: 05-27-2003, 12:43 AM
  4. Unions and Structures
    By C-Struggler in forum C Programming
    Replies: 4
    Last Post: 03-06-2003, 11:28 AM
  5. Structures and unions
    By Paninaro in forum C Programming
    Replies: 6
    Last Post: 06-21-2002, 01:35 PM