Top "C99" questions

This tag is for questions regarding the International Standard ISO 9899:1999, aka "C99", with technical corrigenda, and for questions about code written in C99 (as opposed to K&R C, C89 or later C Standard revisions like the 2011 revision C11).

What are the incompatible differences between C(99) and C++(11)?

This question was triggered by replie(s) to a post by Herb Sutter where he explained MS's decision to not …

c++ c c++11 c99
Forward declaration of inline functions

I have a header file that is going to contain a large amount (30+) of inline functions. Rather than having the …

c++ c inline c99 forward-declaration
Cleaning up C/C++ code reveals problems with variadic macros

We're doing some code cleanup, fixing signed/unsigned comparisons, running static analysis, etc, on the code base of C, C++, …

c++ c macros c99 variadic-macros
Is type-punning through a union unspecified in C99, and has it become specified in C11?

A number of answers for the Stack Overflow question Getting the IEEE Single-precision bits for a float suggest using a …

c c99 unions c11 type-punning
C Complex Numbers in C++?

The following code compiles and runs just fine in C (at least according to 'gcc -std=gnu99'), but it …

c++ c99 complex-numbers
error: unknown conversion type character 'l' in format - scanning long long

I'm trying to get long long from the console using standard IO function scanf. I started with %lld: scanf("%lld", &…

c scanf c99
ftell at a position past 2GB

On a 32-bit system, what does ftell return if the current position indicator of a file opened in binary mode …

c file-io c99 stdio ftell
Can't understand this way to calculate the square of a number

I have found a function that calculates square of a number: int p(int n) { int a[n]; //works on …

c arrays pointers c99 variable-length-array
How universally is C99 supported?

How universally is the C99 standard supported in today's compilers? I understand that not even GCC fully supports it. Is …

c c99 standards-compliance
How can I return an anonymous struct in C?

Trying some code, I realized that the following code compiles: struct { int x, y; } foo(void) { } It seems as if …

c struct return-value c99 return-type