Where is `scanf` implementation source code

cprintfsource

I want to find C source code for scanf implementation on Linux machine. Googling to find scanf implementation does not tell me the way to find it. I tried to find that source code from gcc source tree using ctags and cscope, but I could not find it. Can anybody please tell me where is scanf function definition, i.e. implementation source code?

Best Answer

It's in glibc library scanf.c source

glibc stands for GNU C Library. It is a C standard library implementation. It's not a part of the compiler, because you might have different implementations of it (like Microsoft C run-time for example) as well as different compilers (like clang).

Related Question