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

  1. /* sumnums.c -- type mismatch in function arguments  */
  2. /*              No function prototyping              */
  3.  
  4. int sums();
  5.  
  6. main()
  7. {
  8.     float a = 10.0;
  9.     float b = 20.0;
  10.     int c;
  11.  
  12.     c = sums(a, b);
  13.     printf("sum of %.1f and %.1f is %d\n", a, b, c); ;
  14. }
  15.  
  16. int sums(x, y)
  17. int x, y;
  18. {
  19.     return (x + y);
  20. }
  21.  
  22.