What is difference between C library and Standard Library?
I just want to know what is the difference between C library and standard library? main() is an user defined开发者_高级运维 function but the name "main" and it arguments are predefined in in C library or standard library ?
Erm... no?!?
The function main
and its arguments are defined by the C language standard. This has nothing to do with any library; it's always up to you to implement that function.
In common lingo, a "C library" is any function library that has a C interface, i.e. is usable by C programs.
The "C standard library", "standard C library" or "standard library" is the library containing the functions defined by chapter 7 of the C language standard. This includes (but is not limited to) the functions declared in the headers <stdio.h>
, <string.h>
, <stdlib.h>
etc. etc.
The "standard library" for Linux, for example, is the GNU C library, or glibc. In addition to the functions from chapter 7 of the language standard, glibc contains many additional functions not defined there. This makes things a bit fuzzy. Those additional functions are part of glibc, but not part of the "C standard library".
You know, all bulldogs are dogs, but not all dogs are bulldogs. ;-)
LIBRARY FUNCTION: *library function are predefined set of function that are defined in c library. *user can only use the functions, but cannot change or modify the functions.
USER DEFINED FUNCTION: *user defined function are function defined by the user according to his/her representation. *user can use and modify this function.
精彩评论