#include #include /** * A small test of the effect of writng to stdout vs stderr * Author: gtowell * Created: Feb 2021 * **/ int main(int argc, char *argv[]) { // check the input if (argc < 3) { printf("Usage: xxx O_or_1 integer\n"); return 0; } // select stdout or stderr FILE *ff = atoi(argv[1]) == 0 ? stdout : stderr; for (int j = 0; j < 20; j++) { for (int i = 0; i < 26; i++) { putc('a' + i, ff); } } // cause a problem so that the progam does not end cleanly int a = 0; int c = 5 / a; return 0; }