English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

union
{
unsigned char c[4];
unsigned long l;
}u={0x0};
wat is there in u.c[0]???
can anyone xplain the program???

2007-09-25 02:35:40 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers

0x0 can be hold by long l not by char
and in union u dont access members

2007-09-25 18:59:41 · answer #1 · answered by i_am_the_next_best_one 5 · 0 0

I believe what you are looking at is a struct. If you are more familiar with object oriented programming, think of it like a class. You could declare something as being of type 'union' and assign things to its member variables, the char array and the long. Unfortunately, having not used these much myself, I am not familiar with what u={0x0] is doing.

2007-09-25 12:44:49 · answer #2 · answered by Haley 5 · 0 0

unsigned char c[4]; is an array... you can see it like that.
c [0, 1, 2, 3 ]
and u.c [0]
is associate Array u.c [0] it means it hold 0 value

2007-09-25 09:48:15 · answer #3 · answered by Mag 7 · 0 0

i have no clue!!

2007-09-25 09:39:11 · answer #4 · answered by Anonymous · 0 1

fedest.com, questions and answers