What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 24127 |  Welcome, Guest!   Register  Login
 Home > Forums > Ask Interview Questions > can we implement structure in c ...
Yugandhar

can we implement structure in c

Replies: 5 | Posted by: Yugandhar on 9/25/2012 | Category: Ask Interview Questions Forums | Views: 343 | Status: [Member] | Points: 10  


can we implement structure in c using union ?
and
can we implement union in c using structure ?

if yes
then How ?


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Hariinakoti
Hariinakoti  
Posted on: 9/25/2012 1:18:06 PM
Level: Starter | Status: [Member] | Points: 25

which type of structure u want?

Thanks & Regards
Hari

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Yugandhar
Yugandhar  
Posted on: 9/25/2012 1:49:43 PM
Level: Starter | Status: [Member] | Points: 25

any type
ex: structure which have char,int,float
like
struct aa
{
char ch;
int i;
float f;
};
but with union

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Hariinakoti
Hariinakoti  
Posted on: 9/26/2012 3:18:45 AM
Level: Starter | Status: [Member] | Points: 25

see this link Yugandhar

http://stackoverflow.com/questions/8425155/c-complicated-use-of-union-of-structures-unions-as-arguments-in-function-pro

Thanks & Regards
Hari

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Muhsinathk
Muhsinathk  
Posted on: 9/28/2012 4:50:50 AM
Level: Bronze | Status: [Member] | Points: 25

A "union declaration" specifies a set of variable values and, optionally, a tag naming the union. The variable values are called "members" of the union and can have different types. Unions are similar to "variant records" in other languages

A structure contains an ordered group of data objects. Unlike the elements of an array, the data objects within a structure can have varied data types. Each data object in a structure is a member or field.

Please refer this link too

http://www.java-samples.com/showtutorial.php?tutorialid=559
http://msdn.microsoft.com/en-us/library/y9zewe0d%28v=vs.80%29.aspx

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Muhsinathk
Muhsinathk  
Posted on: 9/28/2012 4:54:22 AM
Level: Bronze | Status: [Member] | Points: 25

Please mark as answer if it helps to you..That helps others who search the same..

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/22/2013 2:31:24 AM