Top "C" questions

C is a general-purpose programming language used for system programming (OS and embedded), libraries, games and cross-platform.

What does void* mean and how to use it?

Today when I was reading others' code, I saw something like void *func(void* i);, what does this void* mean …

c
Printing a char with printf

Are both these codes the same char ch = 'a'; printf("%d", ch); Will it print a garbage value? I am …

c++ c printf sizeof
Difference between shared objects (.so), static libraries (.a), and DLL's (.so)?

I have been involved in some debate with respect to libraries in Linux, and would like to confirm some things. …

c++ c linux dll linker
How do you implement a class in C?

Assuming I have to use C (no C++ or object oriented compilers) and I don't have dynamic memory allocation, what …

c class oop embedded
How can I read an input string of unknown length?

If I don't know how long the word is, I cannot write char m[6];, The length of the word is …

c scanf
How can I autoformat/indent C code in vim?

When I copy code from another file, the formatting is messed up, like this: fun() { for(...) { for(...) { if(...) { } } } } How can …

c vim code-formatting
Parsing command-line arguments in C?

I'm trying to write a program that can compare two files line by line, word by word, or character by …

c command-line-arguments
How do I pass a command line argument while starting up GDB in Linux?

I have to debug a program that has errors in it as part of my assignment. However, I must first …

c linux debugging gdb command-line-arguments
How does C compute sin() and other math functions?

I've been poring through .NET disassemblies and the GCC source code, but can't seem to find anywhere the actual implementation …

c math trigonometry
How to make parent wait for all child processes to finish?

I'm hoping someone could shed some light on how to make the parent wait for ALL child processes to finish …

c process operating-system fork posix