Top "C" questions

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

How do you determine the length of an unsigned char*?

How do you determine the length of an unsigned char*?

c++ c char unsigned
How does this bitwise operation check for a power of 2?

I'm looking at some code which should be trivial -- but my math is failing me miserably here. Here's a …

c math bit-manipulation
How can I find the header files of the C programming language in Linux?

When I write C programs in Linux, and then compile them using gcc, I am always curious about where those …

c linux gcc header-files
Set breakpoint in C or C++ code programmatically for gdb on Linux

How can I set a breakpoint in C or C++ code programatically that will work for gdb on Linux? I.…

c++ c linux gdb
How to check if a string starts with another string in C?

Is there something like startsWith(str_a, str_b) in the standard C library? It should take pointers to two …

c string comparison startswith
Define 16 bit integer in C

I need to declare an integer in the size of 16 bit, in C. I know that short and int sizes …

c integer 16-bit stdint
C socket: recv and send all data

I would like to obtain a behavior similar to this: Server run Client run Client type a command like "help" …

c sockets client-server send recv
How to enable c11 on later versions of gcc?

I currently use gcc 4.6.3. My understanding is that gcc by default uses the gnu89 standard and I would like to …

c gcc c11
C# vs C - Big performance difference

I'm finding massive performance differences between similar code in C anc C#. The C code is: #include <stdio.h&…

c# c performance
Multi-line DEFINE directives?

I am not an expert, so go easy on me. Are there any differences between these two code segments? #define …

c++ c compiler-construction