CS195, Class 7: Introduction to C (2) Overview: * Lab * Reflection: + Particularly interesting things you observed + Surprises + Frustrations Administrivia: * Shall we permit visitors? * Questions on homework 3? (Yes, I fixed the summary.) ---------------------------------------- Reflection * If you finish early, start on sections 1.3 and 1.4 of K&R * What value should you return from main? * What you should do in the Unix world (and perhaps everywhere) #include main() { ... exit(EXIT_SUCCESS); } /* main() */ * Why can you compile without the header? * gcc is friendlier than it needs to be (e.g., multi-line strings). To make it unfriendly, use % gcc -pedantic * The wonder of floating point approximations. e.g., 1.2 is not stored exactly Use FLT_EPSILON, defined in float.h * % man 3 function gives manual page for a function