Difference between Structures and Unions

This is a discussion on Difference between Structures and Unions within the C Programming forums, part of the General Programming Boards category; Hi every one..I am new to programming..Can any one tell me the difference between structures and unions in C...

  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
    22,308
    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, 09:47 AM
  2. Replies: 6
    Last Post: 09-21-2008, 05:18 PM
  3. Structures - Unions
    By AProg in forum C Programming
    Replies: 16
    Last Post: 05-27-2003, 01: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, 02:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21