SOME NEW FEATURES OF C99 (VS. K&R/ANSI C) 1. The characters // begin a comment that ends at the end of the line. 2. Variable declarations may appear anywhere within a code block; no longer must variables be defined at the top of a code block or outside all functions. 3. Variable declarations (and initializations) may appear in for loops, as in for (int i = 0; i < n; i++) ... 4. The length of an array may be an expression whose value is not known until run-time; no longer must the length of any dimension of an array be known at compile-time. 5. The header file stdbool.h (i.e., #include ) defines type bool (meaning boolean) and symbolic constants true and false. 6. Functions must declare a return value; no longer does the type default to int if no type is specified. 7. There is a new type long long which is at least 64 bits and may be either signed or unsigned. The new suffixes "LL" or "ll" (and "ULL" or "ull") are used for constants of the new long long type. 8. Function-like macros may accept a variable number of arguments by using the ellipsis (...) notation. For replacement, the variable arguments (including the separating commas) are "collected" into one single extra argument that may be referenced as __VA_ARGS__ within the macro's replacement list, as in #define DEBUG(format,...) fprintf(stderr,format,__VA_ARGS__) 9. The members of a struct may be initialized by name, such as in struct {float x, y, z;} s = { .y = 1.0, .x = 3.5, .z = 12.8}; 10. The last member of a struct may be an incomplete array type, such as in struct {int n; char s[]} string; 11. There are new library functions, such as strdup() and asprintf(). 12. There are new header files, such as . CS-223-01/11/20