Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char* argv[]) {
- FILE* fPtr = argc < 3 ? stdin : fopen(argv[2], "r");
- if (fPtr != (FILE*)stdin)
- {fclose(fPtr);} // close if fPtr is not stdin.
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement