# Are C standard library functions considered part of C programming language

Do we consider functions like printf part of C language even if it's not a keyword in it.

The “C programming language“ is defined by a document that defines the syntax and the semantics of programs, and the C standard library. So both are part of the “C programming language”.

However, in CS the term “language” is used in a different way, as a set of strings. You can define a language based purely on the syntax In the C Standard document - that allows you to distinguish between strings that are formally in the language and those that are not, but you still have no clue what a program would do.

You can also incorporate some semantic rules, so that for example int a[-10] or int i = "String" are not considered to be part of the language.

Yes, absolutely.

For a start, they are the same document. The C programming language standard incorporates the standard library.

But even more than this, a C compiler is allowed to generate calls to the C standard library. This is obvious in the case of C++ (e.g. std::unexpected), but even in C, a compiler is free to compile a large struct assignment as a call to memcpy if it wants to. Most C compilers have a way to turn this off.

• I would disagree. From programming language perspective printf or any standard library function is a function like any other. Aug 16 '20 at 9:19
• @dumpram: The official C definition incorporates the standard library into the language definition. How can you argue against that? Aug 16 '20 at 9:26
• If standard library is not provided to the linker, C program which uses standard library functions will not link. Aug 16 '20 at 10:15
• longjmp is most definitely not a “function like any other”. And a program trying to define printf while including studio.h is not a valid C program. In addition, the Standard Library defines types and macros. Aug 16 '20 at 10:41
• @dumpram: You can hack anything together, but then you can’t call it C language. Aug 16 '20 at 10:42