Command-line circuit calculator in C
Write a C program that works out series and parallel resistance, decodes resistor colour bands and finds an RC cut-off, with tests that check each function.
What this proves to recruiters
- You can write clean, structured C.
- You test your own code instead of trusting it.
- You can use Git and write a README.
Skills you will use
- C programming
- Functions and arrays
- Unit testing
- Git
What you need
Nothing to buy: this project only needs a computer and the free software below.
Free software
- GCC or Clang
- VS Code
- Git and GitHub
Steps
- Plan a menu: series, parallel, colour code and RC cut-off.
- Write one function per calculation, for example double parallel(const double *r, int n).
- Read input with fgets and sscanf so bad input does not crash the program.
- Write a small test file that checks known answers, such as 100 Ω ∥ 100 Ω = 50 Ω.
- Add a Makefile with build and test targets.
- Push to GitHub with a README showing example runs.
Make it stand out
- Accept values with units like 4.7k and 100n.
- Suggest the nearest standard E12 resistor value.
Put it on your resume
Wrote a tested command-line circuit calculator in C (series/parallel, colour code, RC cut-off) with a Makefile and unit tests.
Replace each [x] with a number you measured. Real numbers make a line believable.
Keep going
This project fits stage 1, “Maths and programming base”, of the Foundation roadmap.