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

后端 未结 11 991
孤独总比滥情好
孤独总比滥情好 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:32

    You can't do a lot, since most of the standard library functions rely on system calls; you are limited to what you can do with the built-in C keywords and operators. It also depends on the system; in some systems you may be able to manipulate bits in a way that results in some external functionality, but this is likely to be the exception rather than the rule.

    C's elegance is in it's simplicity, however. Unlike Fortran, which includes much functionality as part of the language, C is quite dependent on its library. This gives it a great degree of flexibility, at the expense of being somewhat less consistent from platform to platform.

    This works well, for example, in the operating system, where completely separate "libraries" are implemented, to provide similar functionality with an implementation inside the kernel itself.

    Some parts of the libraries are specified as part of ANSI C; they are part of the language, I suppose, but not at its core.

提交回复
热议问题