#include <stdio.h> #include <console.h> int main(int argc, char *argv[]) { int i; argc = ccommand(&argv); for (i = 0; i < argc; i++) printf("%d. %s\n", i, argv[i]); return 0; }
#undef NDEBUG /* Make sure that assert() is enabled */ #include <assert.h> #include <stdio.h> int main(void) { int x = 100, y = 5; printf("assert test.\n"); /*This assert will output a message and abort the program */ assert(x > 1000); printf("This will not execute if NDEBUG is undefined\n"); return 0; } /* Output: assert test. foo.c:12 x > 1000 -- assertion failed abort -- terminating */