Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save saifsmailbox98/e335ae0b5a613f89abc81652c79e73c7 to your computer and use it in GitHub Desktop.
Save saifsmailbox98/e335ae0b5a613f89abc81652c79e73c7 to your computer and use it in GitHub Desktop.
#include < stdio.h >
void main() {
FILE * fp;
char c;
fp = fopen("BMSCE.txt", "w");
c = getchar();
while (c != EOF) {
putc(c, fp);
c = getchar();
}
fclose(fp);
fp = fopen("BMSCE.txt", "r");
c = getc(fp);
while (c != EOF) {
putchar(c);
c = getc(fp);
}
fclose(fp);
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment