Top "C" questions

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

Concept of void pointer in C programming

Is it possible to dereference a void pointer without type-casting in the C programming language? Also, is there any way …

c void-pointers
shared global variables in C

How can I create global variables that are shared in C? If I put it in a header file, then …

c variables linker global-variables scope
Are types like uint32, int32, uint64, int64 defined in any stdlib header?

I often see source code using types like uint32, uint64 and I wonder if they should be defined by the …

c libc
#define macro for debug printing in C?

Trying to create a macro which can be used for print debug messages when DEBUG is defined, like the following …

c c-preprocessor
How to prevent SIGPIPEs (or handle them properly)

I have a small server program that accepts connections on a TCP or local UNIX socket, reads a simple command …

c io signals broken-pipe sigpipe
How to print time in format: 2009‐08‐10 18:17:54.811

What's the best method to print out time in C in the format 2009‐08‐10 
18:17:54.811?

c time
Post-increment and pre-increment within a 'for' loop produce same output

The following for loops produce identical results even though one uses post increment and the other pre-increment. Here is the …

c++ c for-loop operator-precedence
unknown type name 'uint8_t', MinGW

I get "unknown type name 'uint8_t'" and others like it using C in MinGW. Any ideas how to solve …

c windows mingw
How do I print the full value of a long string in gdb?

I want to print the full length of a C-string in GDB. By default it's being abbreviated, how do I …

c++ c string debugging gdb
How to iterate over a string in C?

Right now I'm trying this: #include <stdio.h> int main(int argc, char *argv[]) { if (argc != 3) { printf("Usage: %…

c iteration