Why would you use a structure?

Skill/Topic: Variables and Pointers
A) You use a structure to access parts of a data
B) You use a structure to group together related data.
C) You use a structure to declare an instance of data group
Explanation: Structure is used to group all related data together

Showing Answers 1 - 4 of 4 Answers

samiksc

  • Jan 19th, 2006
 

(C) to declare an instance of a data group (of related data items)

If multiple choices are allowed -- B and C

  Was this answer useful?  Yes

leela

  • Jun 4th, 2006
 

plz clear me the diffrence between Stucture and union?

  Was this answer useful?  Yes

swapna

  • Jun 14th, 2006
 

structure is to declare different data types at a time,where as a arra y is a group of related data typesthe main difference b/w structure & union is in memory requirement.In structure s memory is sum of all the datatypes declared in it,where as in union memory is the one which holds the highest bytes.struct{ int i;float g;};here memory req is 2+4=6union{int i;float g;};here memory req is only 4 bytes

  Was this answer useful?  Yes

naidu saptagiri

  • Nov 1st, 2006
 

the differnecebetween structure and union is ....the size of structure is sum of all data types containing the structure where as the size of union is the size of largest data type the union contains.....

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions