#include <stdio.h> #include <unistd.h> int main() { FILE* stream = popen ("sort", "w"); fprintf (stream, "This is a test. " ); fprintf (stream, "Hello, world. "); fprintf (stream, "My dog has fleas. "); fprintf (stream, "This program is great. "); fprintf (stream, "One fish, two fish. "); return pclose (stream); }