/* output.c Jeff Ondich, 12 September 2023 Where does printing to stdout go? How about stderr? Try this (where "$" is a Unix command prompt) $ gcc -Wall -Werror -o output output.c [compile this program] $ ./output [run it; what do you see on screen?] $ ./output > file1.txt [what do you see on screen? what else happens?] $ cat outfile1.txt $ ./output 2> file2.txt $ ./output > file3.txt 2> file4.txt $ ./output &> file5.txt Questions: - What is the difference between standard output and standard error? - Why would you want to use them both? */ #include int main() { printf("Hello from printf\n"); fprintf(stdout, "Howdy from fprintf(stdout,...)\n"); fprintf(stderr, "Hey from fprintf(stderr,...)\n"); return 0; }