Help us and donate little Bitcoins to pay the server costs: 1AXLPuRUBYc1JczTW4XS65GL6oWjNP2Vt2

User Tools

Site Tools


Programming Reference/Librarys

Question & Answer

because of the inhumane working conditions at amazon in Germany, I will offer the Amazon app no more! (ARD Reportage)

Table of Contents


    int getc(FILE *stream);

Returns next character from (input) stream stream, or EOF on end-of-file or error.

C Sourcecode Example

 * getc example code
#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
int main( void )
    FILE *stream;
    int c;
    if((stream=fopen("test.txt","r"))==NULL) {
        printf("Cannot open file.\n");
        return 1;
   while((c = getc(stream) ) != EOF) {
        printf("%c", c);
   return 0;

content of test.txt

Test example file for getc source code


  Test example file for getc source code
c/stdio.h/getc.txt · Last modified: 2013/01/22 22:02 (external edit)

The new Question & Answer System is online and waiting for your Questions about Programming problems Impressum