int col; int row; int getChar( ) { int c; c = getchar( ); if( c == EOF ) { return c; } col++; if( c == '\n' ) { col = 1; row++; } return c; } int main( int argc, char **argv ) { int c; col = 1; row = 1; putstring( "Hello CC" ); putnl( ); c = getChar( ); putint( row ); putstring( ": " ); while( c != EOF ) { if( c == '\n' ) { putchar( '$' ); putchar( c ); putint( row ); putstring( ": " ); } else { putchar( c ); } c = getChar( ); } exit( EXIT_SUCCESS ); return EXIT_SUCCESS; }