/ Published in: C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#include <stdio.h> void main() { char str[200]; FILE *fp; if(!fp) return 1; // bail out if file not found { // strip trailing '\n' if it exists if(str[len] == '\n') str[len] = 0; } }
Comments
