Top "Libc" questions

The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library routines used to implement common operations, such as input/output and string handling, in the C programming language.

How to write my own printf() in C?

Actually I am trying to write my own printf() in C by using varags. But I am not getting the …

c libc
gcc: why is the -lm flag needed to link the math library?

If I include <stdlib.h> or <stdio.h> in a C program I don't have to …

gcc libc
Compiling without libc

I want to compile my C-code without the (g)libc. How can I deactivate it and which functions depend on …

c gcc glibc demo libc
fgets() function in C

I know everybody has told me to use fgets and not gets because of buffer overflow. However, I am a …

c stdin fgets libc
Linking against an old version of libc to provide greater application coverage

Linux binaries are usually dynamically linked to the core system library (libc). This keeps the memory footprint of the binary …

linux linker libc
Undefined reference to `clock_gettime` although `-lrt` is given

I've give -lrt as the last linker flag to the compiler. But still getting this error. arif@khost:~/sak/sak.…

linux linker libc
How to sleep for a few microseconds

Consider the following code: #include <stdio.h> #include <time.h> #include <math.h> // Compile …

c linux real-time glibc libc
GLIBC_2.7 not found

I am getting the following error when trying to run several executables: /lib/libc.so.6: version `GLIBC_2.7' not found (…

centos glibc libc
What is the rationale for fread/fwrite taking size and count as arguments?

We had a discussion here at work regarding why fread and fwrite take a size per member and count and …

c libc