Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-19-2005, 02:16 AM   #1
Senior Member
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,197

Rep: Reputation: 45
array of unions in c

Hi lets suppose that we declare an array of unions'

long lala;
int myint;
char mychar[30];

Is is possible to do the following
and so on?
Old 09-19-2005, 03:07 AM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,703

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Just try it, that's the best way to learn.
Old 09-19-2005, 03:48 AM   #3
Senior Member
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,197

Original Poster
Rep: Reputation: 45
i have tried it and i think it works but still i am not sure
Old 09-19-2005, 09:02 AM   #4
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
You have 1200 posts, probably most of them programming-related, but still don't know the basics about arrays and unions? And even more, it works, but you're not sure whether it works?

I hope I didn't hurt you...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
array c++ harrylee2003 Programming 3 10-14-2005 05:04 PM
array of unions (c code) alaios Programming 6 09-16-2005 11:43 AM
structres and unions problem linux_lover2005 Programming 2 04-15-2005 08:31 AM
PERL: Size of an array of an Array inspleak Programming 2 03-10-2004 02:24 PM
2-D Array clowns119 Programming 10 09-24-2003 10:15 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration