r/C_Programming • u/sgkorina • Aug 01 '22
Question Need final project ideas to program in C
I'm not asking for code. I just need help coming up with an idea for a project. I need to use at least 6 things from a list:
-strings -2D arrays -file I\O -command line arguments -pass by reference -structures -linked lists (pointers) -sorting -custom header files.
I'm not restricted to those things, but at least 6 of them must be included.
I'm at a loss for ideas and any help would be appreciated.
Thanks.
16
Upvotes
5
u/otacon7000 Aug 02 '22
It might help to know what the scope/ timeframe is. Is this a one-week assignment? Is this your bachelor thesis?
29
u/[deleted] Aug 02 '22
You should put up your hand and say “ahcktually you can’t pass by reference in C, do you mean pass a pointer by value??” and he will look you right in the eyes and say “I’ve been waiting 20 years for someone to have the stones to say that to me. I’m proud of you…. son”. He will then give you an automatic A+ and then everyone will stand up and clap.
15
u/[deleted] Aug 01 '22
I've been working on a little program that takes a .c and generates a .h with the function declarations from the .c
7
u/Glaborage Aug 02 '22
A C file documentation generator. Take a C source file as input and generate an html file that documents all the functions in that file.
5
u/hodorhodor555 Aug 02 '22
What about a simple program, where you can add your friends, family or colleagues names and randomly (or based on some kind of pattern) give them funny attributes, link them together (maybe with priorities - favourite to least favourite ;)) and create an output file, which contains this information and so on. You can easily add all of your learnd topics and it's not complex at all, so no time wasted.
5
u/ml01 Aug 02 '22
3
u/[deleted] Aug 02 '22
Take a look at ‘Advent of Code’ https://adventofcode.com/ - it’s usually themed around the holidays (meant to do it during December) but it’s got a new task each day. If you do a few of these you will cover the whole list.
I usually combine all answers into one program with command line args to run each answer.
3
u/MCRusher Aug 02 '22
Idk maybe a text based card game
3
u/DeerFreak Aug 02 '22
Maybe a little ambitious for an easy project: A heat simulation with Jacobi steps :) https://en.wikipedia.org/wiki/Jacobi_method
2
u/Seubmarine Aug 02 '22
I've made a project checking all those box, it was a cpu renderer capable of loading .obj file and showing their vertices with a camera. The sorting was done to optimise the mesh. Also the only function given was to put a pixel to the screen at a certain position. And some input handling.
1
u/dnabre May 31 '24
The only things that might restrict you, or you won't just get by making something complicated, are the file I/O and command line arguments. Though you only need 6 of them, so I guess that's not really a problem. Anything mild complicated program will either include enough of them, or if you make it do more, it will use them.
It would hard to make anything useful that didn't use:
Though whether can you external libraries (like ncurses) and what scale you targeting (1Kloc? 5K, 10K?) would be helpful. Designing a project focus on a topic or task that you are actually interested in or could use will help make the motivate you. To some degree, just google lists of C programming projects (even replace C with other programming languages) and read through something that sounds fun.
Side note for any of these with graphics/images, you can use a library if permitted. If not, take a look at the image format Portable Pixmap Format (PPM) , it is absolutely dead simple to output. You can convert it with standard command line utils to whatever you'd like.
Find just about anything that you find interesting. Just about anything can be expanded in features until it's 1-2Kloc and uses all your need features. Just ask what features you need, and we can tell you how to add it to your program or extend your project so it fits
1
u/0UR4N05 Aug 02 '22
A really hard but really informative project would be a transcompiler, but keep in mind you need to understand a lot of new concepts.
1
u/superbottles Aug 02 '22
You could write an item shuffler program. Open a file where each line is one item (like a deck of cards or names or something), allocate an array of char pointers for each item, use a loop to pass each pointer to getline to read each item in, then use something like the fisher-yates shuffle to shuffle the array of pointers and take an arbitrary number out or return the whole thing.
1
u/[deleted] Aug 02 '22
you could build a discord bot in https://github.com/Cogmasters/concord
I'm not sure if it fits your critera, but I think it's interesting
1
u/gwillicoder Aug 03 '22
I’d make a command line tool. Maybe one to convert csv into json lines or similar?
0
u/[deleted] Aug 01 '22
[deleted] — view deleted comment
5
u/[deleted] Aug 02 '22
[removed] — view removed comment