/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that reads a file then 
displays it's content. */
#include <stdio.h>
#include <stdlib.h>

int main() {
    FILE *stream;
    char ch;
    
    /* open file for reading only */
    if((stream=fopen("fgetc.c","r")) == NULL){ 
        printf("cannot open file\n");
        exit(1);
    }
    ch = fgetc(stream);
    printf("%c\n",ch);
    fclose(stream);
}
