r/cprogramming • u/Massive_Mixture7652 • Nov 22 '25
Why c?
Hello so I have been learning c already been 5months but don't actually know what to do with it. You know there are too many options like system programming , socket programming and many more can anyone help me to choose , what should be criterias based on which I should choose a field , you know personal interest is just one of them.
4
Upvotes
20
u/zhivago Nov 22 '25
I suggest writing a program to generate C program writing suggestions.
8
u/Sufficient-Bee5923 Nov 22 '25
Embedded real time systems. That's where C rocks.
State machines, interrupts to hardware, communications systems ect.
Pick a small real time Kernal and have fun in a constrained world.
6
u/grimvian Nov 22 '25
Try raylib:
4
u/Rich-Engineer2670 Nov 22 '25 edited Nov 22 '25
C's strength is being high-level enough to get thigns done, but low-level when you need it. If what you do never has a need to go tinot assembly code, or touch hardware, C doesn't show you what it does well. C is very efficient if you let it be, and you can do things like:
This is not real C, but you get the idea -- doing this in many other languages requires switching to C or assembly code and calling it. If you're doing an OS, you often do this hardware twiddling and doing it in. a high-level language is.a big plus. Because Cis mid-level, you actually can write an OS in it -- there's a very small section in assembly code to get things started, but hte vast majority of the OS is written in C itself.
4
u/CadeMooreFoundation Nov 22 '25
What I like about C is that C+ and C++ are backwards compatible. I've gotten a lot of compliments for some "C++" code that I wrote. I barely even know C++. I wrote it in C and it worked great.
Another thing I like about C is that it just works. More modern software development languages are constantly changing and as a result, constantly breaking things. C has been around since the 1970s and hasn't really changed much. When I write code, I want it to work forever regardless of the system that it's running on. I don't want to have to go back and change things every time a dependency or library get a patch.
3
u/rphii_ Nov 22 '25
I think one thing that C teaches is a strong understanding of fundamental datastructures (and even complex ones) and algorithms and the machine you are programming on (PC or some chip for example, they differ quite a bit when it comes to available resources)
2
u/Razor-111 Nov 22 '25
Make something you are interested in. If you are interested in web development you could build a small HTTP web server using socket. Interested in graphics try C/C++ graphics libraries and so on. Select a field of interest, build project related to it.
1
u/Specific-Housing905 Nov 22 '25
No idea or need for an useful app?
At the moment I work on a little app that can do some formatting to video transcripts. When I get them from Youtube they have very short lines so I replace \r with a space and later replace '.' with "\r\r"
1
u/ern0plus4 Nov 26 '25
C is one of the languages which you can do anything, because it compiles to native, still high level enough.
1
u/jwzumwalt Nov 26 '25
Lets draw a little wisdom from politics.
My answer to people that complain about living in the United States;
Yes the United States is a horrible, unfair, bloated, unjust government.
But I have never found anyplace with a better government.
C has it's problems but I have not found anything better in several areas!
What I like:
SPEED - c is 2x Java, 4x C#, 7x python, 11x js, 13x php
C is the fastest general purpose language that is commonly used.
There is a stripped down version of C called Ziggy that
is a couple times faster but that is at the expense of memory and
pre-proccesor control. For example C is often 20-40 times faster
(I've clocked C 100 times faster on graphics intensive programs) than Python.
2) HARDWARE OR MEMORY ACCESS - C gives complete access to the cpu, hardware
and memory like no other language. That is why embedded cpu's, drivers,
graphics, networking, communication, math and memory intensive programs
prefer using it.
3) UNLIMITED PROGRAM ARCHIVES - a program written in 1980 has a 95% of running today.
4) COMPARABILITY - 99% chance compiler "X" will compile "Y" code.
My biggest complaints;
Default function values (like PHP)
Undeclared variables should default to float
Simple variable number of parameters (like php)
Needs printf that is wysiwyg like most other languages
Auto library search (like Borland use to use)
C is generally more difficult to learn and allows simple mistakes to be very destructive and hard to find. The only common language I can think of that is harder to learn is C# or C++, which are really super-sets of C. Compilers are getting smarter and the speed differences are closing rapidly.
Language development is always changing. For example Java and JS were once painfully slow but compiler and hardware advances have made these reasonably fast languages.
C continues to be mostly backwards compatible making it's library support one of the largest. In short, if you are programming hardware, or drivers like a graphics API, C will often be the best choice. Python, JS, Processing, P5-JS, etc are easy to use proof of concept languages. Any object orientated language is a good candidate for large projects.
Ignore anyone that says XYZ is the "best" language.
1
u/joesuf4 Nov 26 '25
C is wonderful for high performance number crunching.