What is the difference between stdin and STDIN_FILENO?

后端 未结 4 2012
悲&欢浪女
悲&欢浪女 2020-12-24 00:58

What is the practical difference, if any, between stdin and STDIN_FILENO in C?

4条回答
  •  天涯浪人
    2020-12-24 01:43

    stdin is a default FILE pointer used to get input from none other than standard in.

    STDIN_FILENO is the default standard input file descriptor number which is 0. It is essentially a defined directive for general use.

提交回复
热议问题