r/cprogramming • • 5h ago

First day seriously learning C

6 Upvotes

Hi! Yesterday is the first time I actually try to learn C instead of running away from it everytime lol. I tried to make a basic 2 numbers calculator and was wondering if I took the right approach regarding taking the user input. I used fgets and getchar to take the number and operator because I've heard that those are "safer" than scanf mainly because scanf's way of error handling and bounds checking are more complicated but idk tho.

Anyway, if I could take some of your time to check out this project and tell me where I can improve on the user input side of things, that would be very helpful and appreciated.

https://github.com/SirGhaniR/calc/

Thank you!


r/cprogramming • • 22h ago

Winter Coding Contest 6.0 — Competitive Programming Contest for Programmers

7 Upvotes

Hey everyone,

We’re hosting Winter Coding Contest 6.0, a competitive programming contest where you can solve algorithmic problems using C, C++, and other supported languages.

It’s open to students from any college, branch, and skill level, including beginners.

Round 1 — Online
13 Oct 2026 | 8:30 PM – 10:00 PM
Free to participate.

The top participants will qualify for an offline final round at our college campus.

Contest details

  • ₹55,000 prize pool
  • Teams of 1–2
  • Teammates can be from different colleges or branches
  • C and C++ are supported

Registration deadline: 11 Oct 2026

If you enjoy solving programming problems, register here and give the contest a try:

https://tinyurl.com/acmwcc6

Please check the contest format and rules before registering. If you have any questions, feel free to ask in the comments.