1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { FILE *fp = NULL; int c; // Á¤¼ö º¯¼ö¿¡ ÁÖÀÇÇÑ´Ù. fp = fopen("alphabet.txt", "r"); if (fp == NULL) { fprintf(stderr, "¿øº» ÆÄÀÏ alphabet.txt¸¦ ¿ ¼ö ¾ø½À´Ï´Ù.\n"); exit(1); } while ((c = fgetc(fp)) != EOF) putchar(c); fclose(fp); return 0; } | cs |