GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Concepts  >  Data Structures
Go To First  |  Previous Question  |  Next Question 
 Data Structures  |  Question 15 of 202    Print  
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



  
Total Answers and Comments: 4 Last Update: November 02, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 19, 2006 02:10:45   #1  
samiksc Member Since: October 2005   Contribution: 233    

RE: Why would you use a structure?

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

If multiple choices are allowed -- B and C


 
Is this answer useful? Yes | No
June 04, 2006 07:06:28   #2  
leela        

What is the difference between Structure and union?
plz clear me the diffrence between Stucture and union?
 
Is this answer useful? Yes | No
June 14, 2006 02:47:28   #3  
swapna        

RE: Why would you use a structure?
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
 
Is this answer useful? Yes | No
November 01, 2006 22:54:50   #4  
naidu saptagiri        

RE: Why would you use a structure?
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.....
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape