fopen example in c, use of fopen function in C, C File handling

fopen example in c, use of fopen function in C, C File handling



#include

void main()
{
FILE *fopen(), *fp;
int c ;
fp = fopen( "lernc.com", "r" ); /*open file for reading */
c = getc( fp ) ;
while ( c != EOF )
{
putchar( c );
c = getc ( fp );
}

fclose( fp );
}


No comments:

Post a Comment