AceTheInterview
Submit Q&A | Tell a friend
Search site for 

Top 100 Interview Questions & Answers in a convenient and easy to read book!

“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”

– Ravi, California

Read more comments...

Interview Questions And Answers RSS Feed

Answers »

  1. Submitted By: mujeeb — July 8, 2008
    +4 votes
      + -

    structure is abstract data type!
    structures are used to represent data in user defined type.
    each member of structure is allocated separate memory, for memory optimization memory padding is to be considered.
    contrary in a union memory is not allocated to each member variable, instead to member which occupies highest amount of memory, the same memory is used among all the members.

  2. Submitted By: satya prakash — July 11, 2008
    +7 votes
      + -

    the main difference b/w structure and union is occupying of size.

    the size of the union is depending on the element which has largest size in that union.
    where as the size of the structure is sum of all the elements sizes declared in that structure.

    the application of structure is to represent different data items in a continuous memory block.

  3. Submitted By: Harshad — September 29, 2008
    +4 votes
      + -

    1. Structure is user defined data type, by means we can store different type of data.
    2. The most important difference between structure and union is in the size. Size of structure is the size of all the elements withing the structure where as the size of union is the size of highest element within it.

  4. Submitted By: krishnaveni — January 7, 2009
    +0 votes
      + -

    the size of the union is depending on the element which has largest size in that union.
    where as the size of the structure is sum of all the elements sizes declared in that structure

  5. Submitted By: bottu seenu — February 16, 2009
    -2 votes
      + -

    we can access only one union element at a time unlike structure

  6. Leave an Answer/Comment

    To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
    Click to hear an audio file of the anti-spam word

Our Sponsors
Our Sponsors
Contact Us | FAQ | Sitemap | Terms of Use | Privacy Policy | Tell a Friend

Copyright © 1999-2006 Jeeve Technologies LLC. All rights reserved.