fork download
  1. # include < stdio.h >
  2. void main( void )
  3. {
  4. int C ; /* current and */
  5. int lastch ; /* previous charactes */
  6. int lineno = 0 ; /* lines printed so far */
  7. for ( lastch = ‘\n’ ; ( C = getchar( ) ) != EOF ; lastch = C )
  8. {
  9. if ( lastch == ‘\n’ )
  10. {
  11. lineno++;
  12. printf(%6d”, lineno ) ;
  13. }
  14. putchar( C ) ;
  15. }
  16. return ;
  17. }
  18.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:22: fatal error:  stdio.h : No such file or directory
compilation terminated.
stdout
Standard output is empty