What can you do in C without “std” includes? Are they part of “C,” or just libraries?

后端 未结 11 988
孤独总比滥情好
孤独总比滥情好 2021-02-02 06:11

I apologize if this is a subjective or repeated question. It\'s sort of awkward to search for, so I wasn\'t sure what terms to include.

What I\'d like to know is what th

11条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-02 06:26

    The Standard C Library is part of ANSI C89/ISO C90. I've recently been working on the library for a C compiler that previously was not ANSI-compliant.

    The book The Standard C Library by P.J. Plauger was a great reference for that project. In addition to spelling out the requirements of the standard, Plauger explains the history of each .h file and the reasons behind some of the API design. He also provides a full implementation of the library, something that helped me greatly when something in the standard wasn't clear.

    The standard describes the macros, types and functions for each of 15 header files (include stdio.h, stdlib.h, but also float.h, limits.h, math.h, locale.h and more).

    A compiler can't claim to be ANSI C unless it includes the standard library.

提交回复
热议问题