fgetchar

Equivalent to fgetc with the argument stdin (implemented for NetWare® 3.11 and above)

Local Servers:blocking
Remote Servers:blocking
Platform:NLM
Service:Stream I/O

Syntax

  #include <stdio.h>  
   
  int fgetchar  (void);
  

Return Values

The fgetchar function returns the next character from the input stream pointed to by stdin. If the stream is at end-of-file, the EOF indicator is set and fgetchar returns EOF. If a read error occurs, the error indicator is set and fgetchar returns EOF. When an error has occurred, the global variable errno contains a value indicating the type of error detected.

Remarks

The fgetchar function is equivalent to fgetc with the argument stdin.

See Also

fgetc, getc, getchar

fgetchar Example

  #include <stdio.h>  
   
  main()  
  {  
     int c;  
     while( (c = fgetchar()) != EOF )  
        putchar(c);  
  }