Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Structure and Union

Reply
Thread Tools

Structure and Union

 
 
Sami A. Shabah
Guest
Posts: n/a
 
      05-16-2010
Hi,
I'm a student of Mechanical Engineering at IUT. I have the following
question:

What is the basic difference between Structure and Union?

Any reply will be appreciated.

Sami a. Shabah
MCE,IUT,St. no:091402
 
Reply With Quote
 
 
 
 
gpietsch@comcast.net
Guest
Posts: n/a
 
      05-20-2010
The comp.lang.c Oracle has pondered your question deeply.

The question was:
> What is the basic difference between Structure and Union?


And thus spake the Oracle:

A structure is a type consisting of a sequence of members whose
storage is allocated in an ordered sequence, and a union is a type
consisting of a sequence of members whose storage overlap.

You owe the Oracle an explanation of why interviewers ask what
encapsulation means.

Gregory Pietsch
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
structure and union queries Tagore C Programming 37 04-13-2009 12:59 PM
difference between structure and union ,, can anyone help me? manish sahu C++ 5 02-14-2008 11:23 AM
A weird problem on structure and union alignment xmllmx C++ 5 08-26-2007 12:23 AM
union in struct without union name Peter Dunker C Programming 2 04-26-2004 07:23 PM
map XML union to C union (and vice-versa) Matt Garman XML 1 04-25-2004 12:40 AM



Advertisments