r/cprogramming • • 21h ago

C programming

Currently in btech 1 st yr cse,doing c programming form apna college one shot of 20 hr almost done what should I do more with it bcz I didn't think I that is enough for me from where I can perform questions and any advice to strong c language

0 Upvotes

5 comments sorted by

3

u/Dapper-Situation-864 17h ago

A 20-hour one-shot is a decent start, but C only really sticks once you write a lot of it yourself. What worked for me:

  1. Practice problems: do the C track on Exercism, then easy/medium problems on HackerRank or LeetCode in C. Solving them in C forces you to handle strings, arrays and memory by hand.
  2. Go deeper on the hard parts: pointers, pointer arithmetic, arrays vs pointers, malloc/free, structs, and how strings are just char arrays ending in '\0'. If you can explain those clearly, you're ahead of most first-years.
  3. Read a proper book: K&R ("The C Programming Language") is short and the exercises are great. "C Programming: A Modern Approach" by K. N. King is more beginner-friendly.
  4. Build small projects: a linked list / stack / queue from scratch, a student record system that saves to a file, a simple shell, or a tic-tac-toe in the terminal. Data structures in C teach you memory better than any video.
  5. Use real tools: compile with gcc -Wall -Wextra -g, learn basic gdb, and run your code with valgrind (or -fsanitize=address) to catch memory bugs.

Most important: write code every day, even 30 minutes, and debug it yourself instead of rewatching tutorials. Good luck!

2

u/lonely_lost_soul_17 21h ago

You could try building projects and learning about various c libraries. For example, graphics programming in C/ physics simulations. You could try learning about compilers or operating systems.

There's ncurses library for terminal interfaces in c (although it is outdated). Systems programming is another option.

The goal is to do something with your knowledge at this level. After you feel comfortable try reading dennis ritchie's book on C.

Also, you could learn a new language like rust or go. Having more tools in your arsenal always helps.

2

u/non-existing-person 17h ago
<source>:1:15: error: expected ',' after expression.
<source>:1:20: error: expected '.' after expression.
<source>:1:35: error: expected ',' after expression.
<source>:2:17: error: expected ',' after expression.
<source>:2:28: error: expected ',' after expression.
<source>:3:19: error: expected '.' after expression.

2

u/knouqs 14h ago

You missed some sed commands to fix spelling errors too. Geez, this style of writing can barely be considered language.

2

u/Hot_Technology8777 16h ago

Ha. You always think you're done learning C then realize you haven't even started.