Top "C" questions

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

Dereferencing type-punned pointer will break strict-aliasing rules

I used the following piece of code to read data from files as part of a larger program. double data_…

c optimization gcc pointers strict-aliasing
Array type char[] is not assignable

Well here is my first post. I've been trying to do this choice choosing thing and I want the user …

c arrays string assignment-operator
String literals: Where do they go?

I am interested in where string literals get allocated/stored. I did find one intriguing answer here, saying: Defining a …

c memory string-literals
Static assert in C

What's the best way to achieve compile time static asserts in C (not C++), with particular emphasis on GCC?

c gcc assert compile-time static-assert
C/C++ global vs static global

Possible Duplicate: Static vs global I'm confused about the differences between global and static global variables. If static means that …

c++ c static global-variables
What is the fastest substring search algorithm?

OK, so I don't sound like an idiot I'm going to state the problem/requirements more explicitly: Needle (pattern) and …

c algorithm string substring
snprintf and Visual Studio 2010

I'm unfortunate enough to be stuck using VS 2010 for a project, and noticed the following code still doesn't build using …

c visual-studio-2010
Size of int and sizeof int pointer on a 64 bit machine

I was just wondering how can I know if my laptop is 64 or 32 bit machine. (it is a 64). So, I …

c++ c int 64-bit sizeof
How can a Format-String vulnerability be exploited?

I was reading about vulnerabilities in code and came across this Format-String Vulnerability. Wikipedia says: Format string bugs most commonly …

c security format-string
How to print 1 byte with printf?

I know that when using %x with printf() we are printing 4 bytes (an int in hexadecimal) from the stack. But …

c printf format-specifiers