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

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