home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / datafiles / text / c_tutor / mortypes.c < prev    next >
C/C++ Source or Header  |  1995-02-27  |  542b  |  19 lines

  1. /* The purpose of this file is to introduce additional data types */
  2.  
  3. main()
  4. {
  5. int a,b,c;            /* -32768 to 32767 with no decimal point */
  6. char x,y,z;           /* 0 to 255 with no decimal point */
  7. float num,toy,thing;  /* 10E-38 to 10E+38 with decimal point */
  8.  
  9.    a = b = c = -27;
  10.    x = y = z = 'A';
  11.    num = toy = thing = 3.6792;
  12.  
  13.    a = y;           /* a is now 65 (character A) */
  14.    x = b;           /* x will now be a funny number */
  15.    num = b;         /* num will now be -27.00 */
  16.    a = toy;         /* a will now be 3 */
  17.  
  18. }
  19.