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 is the behavior of integer division?

For example, int result; result = 125/100; or result = 43/100; Will result always be the floor of the division? What is the defined …

c math c99 c89 integer-division
Printf width specifier to maintain precision of floating-point value

Is there a printf width specifier which can be applied to a floating point specifier that would automatically format the …

c floating-point printf c99 floating-point-precision
Printf long long int in C with GCC?

How do I printf long long int and also unsigned long long int in C99 using GCC? I have searched …

c gcc printf c99
bool to int conversion

How portable is this conversion. Can I be sure that both assertions pass? int x = 4<5; assert(x==1); x = 4>5; …

c++ c c99
Setting std=c99 flag in GCC

I was wondering if there were any files in which I could set the -std=c99 flag, so that I …

c programming-languages c99
C99 stdint.h header and MS Visual Studio

To my amazement I just discovered that the C99 stdint.h is missing from MS Visual Studio 2003 upwards. I'm sure …

c++ c visual-studio c99
state machines tutorials

I am just wondering if anyone know of some good tutorials on the Internet for developing state machines. Or ebooks? …

c c99 state-machine
What is the difference between C, C99, ANSI C and GNU C?

I have started programming practice on codechef and have been confused by the difference between C and C99. What does …

c gcc c99 c89 ansi-c
Standard alternative to GCC's ##__VA_ARGS__ trick?

There is a well-known problem with empty args for variadic macros in C99. example: #define FOO(...) printf(__VA_ARGS__) #define …

c c99 c-preprocessor variadic-macros
How to wrap printf() into a function or macro?

This sounds a little like an interview question,but is actually a practical problem. I am working with an embedded …

c logging c99 word-wrap