|
|||
Department of Engineering | |
University of Cambridge > Engineering Department > computing help |
#include <stdio.h> #include <stdlib.h> int mean(int a,int b) { return a + b; } main() { int i; float f; int answer; i = 7; f= 5.3; /* deliberate mistake! */ answer = mean(f,j); printf("%f + %d = %d\n", f, j, answer); }
assert.h | Assertions |
ctype.h | Character identification |
errno.h | Error handling |
float.h | Max and Min values for floats |
limits.h | limits for integral types |
locale.h | Internationalisation info |
math.h | Advanced math functions |
setjmp.h | Non-local jump |
signal.h | Exception handling |
stdarg.h | Variable numbers of arguments |
stddef.h | Standard definitions |
stdio.h | Input/Output |
stdlib.h | General Utilities |
string.h | String Manipulation |
time.h | Date and Time functions |
If you want to support both ANSI C and K&R C , you can use the following construction
#ifdef __STDC__ /* ANSI code */ #else /* K and R code */ #endif