As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [c99]

C99 is the latest standard of the general purpose C programming language. It was adopted as an ANSI standard in the year 2000.

Filter by
Sorted by
Tagged with
2 votes
2 answers

C99: Alternative to "static" variable declaration?

By coincidence I stumbled over "The New C Standard" from Derek M. Jones, where he comments this sentence from the C99 standard regarding "storage duration of objects": There are ...
mic's user avatar
  • 137
3 votes
1 answer

How to make my educational dynamic array C library less verbose to use?

I really like to make tools prior to starting some assignment, so for the C programming assignments I have prepared dynamic array library. We are restrained to only using C99 standard. Note that all ...
Tomáš Zato's user avatar
9 votes
5 answers

Definition of portable C

I have been having a huge and heated argument with someone on a slack group - the debate is this : My argument Portable code is that which compiles with various compilers and runs exactly the same ...
rep_movsd's user avatar
  • 209
2 votes
1 answer

Memory/cache performance in working with arrays in C

I've been toying with some array examples in C. I want to understand more about memory concepts, alignment, and cache. Especially on large arrays on heap. Sometimes I work on large images (extremely ...
Keyframe's user avatar
  • 121
3 votes
2 answers

Complex iterators in C

note: this was originally asked on SO. Part of my current project involves iterating over sequences that don't necessarily exist. For example, I have something similar to a relational database in ...
Gage's user avatar
  • 131
2 votes
2 answers

Function naming design in a C Library

I'm writing a C (c99) library that operates on strings. I'm having a design problem writing functions that will perform in different modes. For example; the Find function can search for: the first, ...
reader's user avatar
  • 123
8 votes
4 answers

Static vs. non-static? (with non-OOP functions)

Although this question has come up before, mine is different because it is not supposed to cover anything OOP but only plain (ANSI) C. Especially in open-source software, I usually encounter a ...
syntaxerror's user avatar
0 votes
1 answer

Why are zero length VLAs allowed in C99, but not in C11 any more?

In the comments to this former question, there was a discussion if the C standard allows variable length arrays (VLAs) of length 0 or not. As it turns out, the C99 standard states: In Array ...
Doc Brown's user avatar
  • 196k
8 votes
4 answers

What situations are appropriate for C# to C interop?

Given that C# has the unsafe keyword, are there situations in which it would still be beneficial to interoperate with C libraries? I could see the need for very fast number crunching, graphical ...
Robert Harvey's user avatar
10 votes
3 answers

Does C99 make the K&R book outdated? If so what to recomend in its place? [closed]

C99 has been with us for a while now. It introduces a lot of features that are not in K&Rs The C Programming Language. None of them are particularly radical. However, even small features like ...
Justin Dearing's user avatar
6 votes
4 answers

Which version of C should I learn? [closed]

It looks like K&R "C Programming Language (2nd Edition)" covers ANSI C, but another book that I'm starting (Stephen G. Kochan "Programming in C") says that it uses C99. I'm coming from a C#/...
Nogwater's user avatar
  • 171
5 votes
3 answers

Should one avoid or be careful with C99 features in C code?

Some seem to say that one should avoid C99 features in C code as compilers don't really support those features. C99 is a standard from 1999, shouldn't these features be quite widespread now? Should ...
Anto's user avatar
  • 11.1k