Top "C" questions

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

How can I check if a directory exists?

How can I check if a directory exists on Linux in C?

c linux directory
Concatenating strings in C, which method is more efficient?

I came across these two methods to concatenate strings: Common part: char* first= "First"; char* second = "Second"; char* both = malloc(…

c string performance concatenation
What is the fastest/most efficient way to find the highest set bit (msb) in an integer in C?

If I have some integer n, and I want to know the position of the most significant bit (that is, …

c algorithm optimization bit-manipulation
How do I use setsockopt(SO_REUSEADDR)?

I am running my own http server on a raspberry pi. The problem is when I stop the program and …

c sockets raspberry-pi
C error: Expected expression before int

When I tried the following code I get the error mentioned. if(a==1) int b =10; But the following is syntactically …

c syntax-error conditional-statements variable-declaration
How do pointer-to-pointer's work in C? (and when might you use them?)

How do pointers-to-pointers work in C? When might you use them?

c pointers
GDB: Listing all mapped memory regions for a crashed process

I've got a full-heap core dump from a dead process on an x86 Linux machine (kernel 2.6.35-22 if it matters), …

c linux gdb
What does "control reaches end of non-void function" mean?

I've been getting strange compiler errors on this binary search algorithm. I get a warning that control reaches end of …

c warnings compiler-warnings
CRC32 C or C++ implementation

I'm looking for an implementation of CRC32 in C or C++ that is explicitly licensed as being no cost or …

c++ c crc32
Is it possible to modify a string of char in C?

I have been struggling for a few hours with all sorts of C tutorials and books related to pointers but …

c string debugging