All Questions
Tagged with design-patterns c
6 questions
4
votes
1
answer
381
views
Modular Design Patterns in C
I have created a modular design pattern which provide a single interface that can be used create instances with swapable back-end components, however I'm not entirely satisfied with it.
My practical ...
3
votes
2
answers
115
views
Print input one word per line (K&R 1-12 exercise) attempt
I'm currently trying to learn C from the K&R book, reading through and attempting the exercises. I came across exercise 1-12 yesterday and was a little stumped but managed to complete it. I was ...
6
votes
3
answers
5k
views
State machine implementation
I have written a simple state machine. Comments and feedback are welcome.
...
10
votes
2
answers
147
views
Scalability of running commands from user input
Here is some code I have that has been extracted and shrunk down from a project of mine.
...
11
votes
2
answers
8k
views
Developing a better state pattern in C
I have created a state diagram to show the different transitions and states. I could not find many examples of the state pattern in C, so I have taken an example from a Java state pattern and tried to ...
5
votes
1
answer
148
views
Module for making a doubly linked list
This module makes a doubly linked list and initializes each member. I couldn't do it with a loop, so I gave up and made each node individually.
How can I improve it? Can somebody help me make a ...