Questions tagged [libc]

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.

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.

There are many implementations of libc with different resource requirements, security goals, etc. With a typical tool chain the libc, compiler and OS work together to achieve some ISO, Posix or custom features/standards. Some libc implementation are only a subset of the ISO standard, but still full featured enough to be used in many applications.

Specific libc tags:

  • - the full Gnu Libc found on most GCC installs.
  • - a smaller micro-controller libc for resource constrained devices
  • - Android libc
  • - unhosted libc
  • - more modern lighter foot print libc

Websites

See also:

Do not confuse with , which is for the C++ programming language.

1076 questions
-2
votes
3 answers

Why printf is not able to handle flags, field width and precisions properly?

I'm trying to discover all capabilities of printf and I have tried this : printf("Test:%+*0d", 10, 20); that prints Test:%+100d I have use first the flag +, then the width * and the re-use the flag 0. Why it's make this output ? I purposely used…
Sadek
  • 175
  • 1
  • 7
-2
votes
1 answer

How to calculate GMT Time based on Local time in C

I have a linx based system where we cannot specify timezone of the time being set. So whoever sets time on this device sets their localtime. Now I have a requirement where I need to calculate the GMT Time based on the localtime that was existing on…
Kranthi Kumar
  • 1,184
  • 3
  • 13
  • 26
-2
votes
1 answer

Reasons four double undescores in standard library implementations

Is there any technical reason for standard library (C or C++) implementations to, IMO abuse, underscores the way they do (=prefix everything with two undescore + add a trailing underscore to denote that a variable is a member variable)? I get that…
Petr Skocik
  • 58,047
  • 6
  • 95
  • 142
-2
votes
3 answers

Why is the argument to perror defined with the ISO C attribute const?

I came across this question while doing the exercises in Advanced Programming in the Unix Environment by Stevens: The argument to perror is defined with the ISO C attribute const, whereas the integer argument to strerror isn't defined with this…
narendraj9
  • 131
  • 2
  • 7
-2
votes
4 answers

array of pointers to string , segmentation fault occurs

I am learning pointer in c i have written a small program , but i am getting segmentaion fault i dont know where i am having the issue please let me know the issue with the code , it is an array of pointers to string , which is in a pointer to…
-2
votes
1 answer

C printf output to variable

I am trying to a loop packet [bytes] and to put the result into the variable, however I stucked for few hours to put it into variable. This is what is working, just outputting it. I've tried strcat, strcpy and sprintf to put the output into a…
Wiggler Jtag
  • 669
  • 8
  • 23
-2
votes
1 answer

Is there a reference of all the user data structures used over linux (gcc)

where is the type size_t defined what are the other types like this , Is there a reference of the all the user defined types and data structures in linux (gcc) . for example a reference guide on sockaddr_in6 sockaddr_in mm_struct pci_dev …
cc4re
  • 4,821
  • 3
  • 20
  • 27
-2
votes
2 answers

strcmp failing to compare strings properly

I'm having trouble using strcmp in C. I'm trying to compare a program's arguments using strcmp but even though the strings are the same it doesn't work. Here is the portion of code. while(strcmp(argv[i], "-e") != 0) So for i = 11 if I print the…
Atirag
  • 1,660
  • 7
  • 32
  • 60
-3
votes
2 answers

libstdc++-doc simply ignores imported c functions,c++ really junky?

Each header from the C Standard Library is included in the C++ Standard Library under a different name, generated by removing the .h, and adding a 'c' at the start, for example 'time.h' becomes 'ctime'. The only difference between these…
Je Rog
  • 5,675
  • 8
  • 39
  • 47
-4
votes
2 answers

In which cases does printf return a negative value?

I'v been working on my own version of printf for educational purposes and while reading the manual I read that the function can return negative value when facing an error. At first I believed that it returns -1 / negative value when an error occurs…
Nail0x
  • 19
  • 5
-4
votes
1 answer

noticed a process in linux which isn't shown in process list hows that happen?

i have recently noticed a hidden process it isn't appearing in process list, but its consuming cpu time and memory.how does this happen , how is it written , whats the job its doing , how can we kill that process. Is There any way to unhide such…
Kajal
  • 223
  • 4
  • 15
1 2 3
71
72