Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe I haven't read K&R carefully enough but how can you have a function declaration like

    sleep(chan, pri)
without any data types?


Because the default datatype is int:-

  $ cat z.c
  foo( a, b )
  {
          return( a+b );
  }
  
  main( void )
  {
          return( foo( 3, 4 ) );
  }
  $ gcc z.c
  $ ./a.out
  $ echo $?
  7




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: