Top "C" questions

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

Is there a typical state machine implementation pattern?

We need to implement a simple state machine in C. Is a standard switch statement the best way to go? …

c design-patterns finite-automata
What do numbers using 0x notation mean?

What does a 0x prefix on a number mean? const int shared_segment_size = 0x6400; It's from a C program. …

c integer hex notation
How to create a md5 hash of a string in C?

I've found some md5 code that consists of the following prototypes... I've been trying to find out where I have …

c md5
how to use #ifdef with an OR condition?

Sorry for asking very basic question. I would like to set OR condition in #ifdef directive.? How to do that ? …

c macros
Format specifier %02x

I have a simple program : #include <stdio.h> int main() { long i = 16843009; printf ("%02x \n" ,i); } I am …

c printf format-specifiers
How to draw text using only OpenGL methods?

I don't have the option to use but OpenGL methods (that is glxxx() methods). I need to draw text using …

c++ c opengl graphics
Does C have a string type?

I have recently started programming in C, coming from Java and Python. Now, in my book I have noticed that …

c string char printf strcpy
Multiple definition of ... linker error

I defined a special file: config.h My project also has files: t.c, t.h pp.c, pp.h …

c linker linker-errors
How to return a value from pthread threads in C?

I'am new to C and would like to play with threads a bit. I would like to return some value …

c pthreads
What REALLY happens when you don't free after malloc?

This has been something that has bothered me for ages now. We are all taught in school (at least, I …

c malloc free