tags:

views:

65

answers:

1

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 ?

+4  A: 

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. ;-)

DevSolar
thnx DevSolar...
Parixit