From: Robin Burrows Newsgroups: comp.os.msdos.djgpp Subject: Re: How many bits do the Data types need? Date: Sun, 12 Apr 1998 13:02:04 +0100 Organization: Virgin Net Usenet Service Lines: 29 Message-ID: <3530AD3C.4CA7@bigfoot.com> References: <6gq967$e25$1 AT news DOT metronet DOT de> Reply-To: rburrows AT bigfoot DOT com NNTP-Posting-Host: 194.168.65.207 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 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)