#include #include int main() { FILE* cfPtr ; char buffer[100] ; strcpy( buffer, "hello" ) ; if ( (cfPtr = fopen( "data1.txt" , "wb" ) ) == NULL ) { printf( "File could not be opened.\n" ); } else { for( int i1=100 ; i1 <= 110 ; i1++ ) { fwrite( &i1, sizeof( i1 ), 1, cfPtr ) ; } fwrite( buffer, strlen( buffer), 1, cfPtr ) ; fclose ( cfPtr ); } /* fclose closes the file */ return 0; }