home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap03 / formats.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-06  |  299 b   |  12 lines

  1. /* formats.c -- shows what happens when format */
  2. /*              doesn't match data type        */
  3.  
  4. main()
  5. {
  6.     int i = 5;
  7.     printf("As integer:      %d\n", i);
  8.     printf("As long integer: %ld\n", i);
  9.     printf("As exponential:  %e\n", i);
  10.     printf("As float:        %f\n", i);
  11. }
  12.