- #include <stdio.h>
- void main(void)
- {
- FILE *input;
- if ((input = fopen("\CONFIG.SYS", "r")) == NULL)
- printf("Error opening \CONFIG.SYSn");
- else
- {
- printf("Handle for CONFIG.SYS %dn", input->fd);
- printf("Handle for stdin %dn", stdin->fd);
- printf("Handle for stdout %dn", stdout->fd);
- printf("Handle for stderr %dn", stderr->fd);
- printf("Handle for stdaux %dn", stdaux->fd);
- printf("Handle for stdprn %dn", stdprn->fd);
- fclose(input);
- }
- }