Seeking Feedback on My First C Project: A Modular Calculator

0
6
Asked By CleverCactus72 On

I recently transitioned from Python to C as part of my journey into cybersecurity. To get a grip on C's project structure, I created a modular calculator as my first project. Here's what I've implemented so far:

- Basic mathematical operations (addition, subtraction, multiplication, division) with input validation.
- A modular design featuring separate header and source files.
- A Makefile to streamline the building process.
- A GitHub repository that includes documentation.
- An interactive menu with a looping functionality.

I'm looking for some feedback on several aspects:
1. What are some ways I can enhance my error handling?
2. Are there any features you would suggest for practicing with pointers and memory management?
3. Can you recommend similar projects that are more focused on security?
4. Any tips on improving my overall code organization?

Although it currently functions as a basic calculator, my goal is to develop it into a tool for offset calculations used in security and penetration testing. Right now, I'm concentrating on mastering C syntax and effective project structuring.

You can check out my GitHub repository here: [https://github.com/veiintiuno/SecurityCalc](https://github.com/veiintiuno/SecurityCalc)

2 Answers

Answered By TechSavvyTurtle On

A great way to build good habits is by setting up a CI pipeline using GitHub Actions. It can automatically build your code when you push changes, and you could also incorporate some tests to run in CI. This approach really elevates your project!

Answered By WittyCoder99 On

For improving error handling, focus on edge cases like division by zero and consider using error codes. If you’re looking to practice pointers, you could experiment with dynamic memory allocation. If you're interested in security topics, try implementing buffer overflow simulations!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.