Top "C89" questions

This tag is for questions regarding the international standard ISO 9899:1990, also known as "C89", "C90" or "ANSI C", with amendments and technical corrigenda (as opposed to K&R C, C99, C11 or later C standard revisions).

Implementing a FIFO queue in C

For an embedded application, I am trying to implement a first-in, first-out (FIFO) queue of structs using ANSI C. The …

c struct fifo c89
How to "simulate" C99 in Visual Studio for variables declaration

I'm using Visual Studio 2012 to develop simple Win32 C programs. I know that the VS compiler only supports C89, but …

c visual-studio-2012 c99 c89
Why can't gcc find the random() interface when -std=c99 is set?

I do "#include <stdlib.h>" at the top of the source. Example compilation: /usr/bin/colorgcc -std=c99 …

c gcc random c99 c89
How can I get error message for errno value (C language)?

How can I get error message for errno value (C language)? For example, I can write such file (errno_messages.…

c c89
Dynamic memory allocation on stack

I recently tried this experiment in which instead of going for dynamic memory allocation for memory requirements of unknown size, …

c gcc memory dynamic c89
A good C equivalent of STL vector?

I've noticed that at several places in our code base we use dynamically expanding arrays, i.e. a base array …

c c89
Are prototypes required for all functions in C89, C90 or C99?

To be truly standards-compliant, must all functions in C (except for main) have a prototype, even if they are only …

c c99 c89
Problem trying to use the C qsort function

#include <stdio.h> #include <stdlib.h> float values[] = { 4, 1, 10, 9, 2, 5, -1, -9, -2,10000,-0.05,-3,-1.1 }; int compare (…

c c89 qsort
How to rewrite C-struct designated initializers to C89 (resp MSVC C compiler)

guys, I've this problem: Normally in C99 GCC (cygwin / MinGW / linux), there is dot-notation syntax for initializers in C struct. …

c visual-c++ struct initialization c89
Compatibility of C89/C90, C99 and C11

I just read: C Wikipedia entry. As far as I know there are 3 different versions of C that are widely …

c c99 iso c11 c89