Pelles C forum

C language => Beginner questions => Topic started by: PhilG57 on April 17, 2013, 08:06:06 PM

Title: Default Data Types
Post by: PhilG57 on April 17, 2013, 08:06:06 PM
I'm playing with some code which contains this structure -
typedef struct xxx {
   unsigned aaa[5];   /* aaa          */
   unsigned bbb;   /* bbb          */
} xxx;


Later the structure is defined (declared????) as follows -

xxx what;
and used as follows -

  what->aaa[0] = 0x12345678;
   what->bbb = 0;


Question1: what data type is "aaa"?
Question2: is "bbb" an int data type?

Thanks (again).
Title: Re: Default Data Types
Post by: Stefan Pendl on April 17, 2013, 10:15:49 PM
One usually writes unsigned int, but some compilers allow the shorthand of using only unsigned.

For best readability I would always use unsigned int.