Category : C Source Code
Archive   : C-TUTOR.ZIP
Filename : MORTYPES.C

 
Output of file : MORTYPES.C contained in archive : C-TUTOR.ZIP
/* Chapter 4 - Program 2 */
/* The purpose of this file is to introduce additional data types */

main()
{
int a,b,c; /* -32768 to 32767 with no decimal point */
char x,y,z; /* -128 to 127 with no decimal point */
float num,toy,thing; /* 3.4E-38 to 3.4E+38 with decimal point */

a = b = c = -27;
x = y = z = 'A';
num = toy = thing = 3.6792;

a = y; /* a is now 65 (character A) */
x = b; /* x is now -27 */
num = b; /* num will now be -27.00 */
a = toy; /* a will now be 3 */

}


  3 Responses to “Category : C Source Code
Archive   : C-TUTOR.ZIP
Filename : MORTYPES.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/