c
来自「C程序设计经典900例.zip」· 代码 · 共 25 行
TXT
25 行
#include <stdio.h>
void main(void)
{
FILE *input;
int letter;
if ((input = fopen("\\CONFIG.SYS", "r")) == NULL)
printf("Error opening \\CONFIG.SYS\n");
else
{
printf("Current position is byte %d\n\n", ftell(input));
// Read and write each character in the file
while ((letter = fgetc(input)) != EOF)
fputc(letter, stdout);
printf("\nCurrent position is byte %d\n", ftell(input));
fclose(input); // Close the input file
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?