Mail Archives: djgpp/1998/04/12/08:15:22
Lennart Marien wrote:
>
> Hi!
> I have a short question concerning the data types in
> DJGPP.I programmed in Pascal and ASM so far and
> I now have to translate some Data Types.
> What I like to know is:
> How many bits is
>
> a char(guess 8)
> a short(guess 16)
> an int(guess 32)
> a long(no idea)
>
> Thank you!
Try this:
#include <stdio.h>
int main (void)
{
printf ("char\t%d\nshort\t%d\nint\t%d\nlong\t%d\nptr\t%d\n",
sizeof (char), sizeof (short int), sizeof (int),
sizeof (long int), sizeof (char *));
return 0;
}
(didn't test it, but should work)
- Raw text -