_handles.c

来自「C_C++程序员实用大全(精华版)源代码 代码详实 一步一步深入 适合各阶段」· C语言 代码 · 共 18 行

C
18
字号
#include <stdio.h>

void main(void)
 {
	FILE *input;

	if ((input = fopen("\\CONFIG.SYS", "r")) == NULL)
                printf("Error opening \\CONFIG.SYS\n");
	else
  	 {
                printf("Handle for CONFIG.SYS %d\n", input->_file);
                printf("Handle for stdin %d\n", stdin->_file);
                printf("Handle for stdout %d\n", stdout->_file);
                printf("Handle for stderr %d\n", stderr->_file);
		fclose(input);
	 }
 }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?