Questions tagged [c89]
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).
11
questions
5
votes
2answers
88 views
Trigraph translator
Recently I thought about what a program would look like if all its characters that could become trigraphs became trigraphs. For example
...
11
votes
1answer
227 views
7
votes
3answers
853 views
Cracking the Coding Interview — 1.5 One Away
I would like to know any suggestions about to improve my code solution and your rating of my approach to the problem, I based my code on the fact that if the strings have different length removing one ...
0
votes
2answers
179 views
Cracking the code interview: Problem 1 .6 basic string compression
I created a GitHub repository containing my code solutions for some of the exercises proposed in the book. I updated my solution for the problem 1.6 here.
Description
A function that compress the ...
9
votes
2answers
194 views
Generic data structures in C
I'm new to C, and I thought a great way to learn would be to implement some generic data structures and algorithms. So far I've implemented a linked list and a dynamic array. Both are generic, the ...
3
votes
1answer
58 views
Stern's diatomic series fusc: replacing #define functions with two return values
I have a function to review which implements Stern's diatomic series fusc for a single word (ulong = unsigned long) in place, as ...
4
votes
4answers
224 views
Reading a text file that may have embedded nulls
I've always used fgets to read a file. However, I want to read a file that may have embedded \0. I thought of using ...
7
votes
0answers
176 views
Engineering an even faster qsort
I understand that C++ STL template sort runs faster than qsort in C because ...
3
votes
1answer
60 views
unordered_set: a hash table -based set data structure in C89
In this post, I present a hash table -based set data structure written in C89:
unordered_set.h
...
2
votes
1answer
39 views
Uni- and bidirectional pseudo-generic shortest path finders in C89
I have implemented two related shortest path algorithms for unweighted graphs in C89. My attempt was to learn some more idiomatic C constructs such as genericity (a client programmer should be able to ...
7
votes
4answers
105 views
Label my cassette boxes
Historical Friday: this was my first useful C program, written around 1993-1994 (with only occasional access to a compiler and runtime environment). It's also my first non-trivial Postscript, too.
...