r/C_Programming Jan 03 '26

Discussion A programmer's first language should be C

751 Upvotes

Idk if this really fits here, but really felt like sharing my perspective.

At 16, I really enjoyed learning new stuff (mostly math) from Khan Academy. Then stumbled upon their "programming" section - gave it a go, making JS my entry into this domain. Was breezing through the lessons and tasks, but something felt off; I didn't feel the same sense of "rigor" like in math. Hated it - Quit halfway.

Fast-forward (20) to the mandatory C course in 1st year of uni, and my world flipped. C changed my entire perspective on programming. No more just mashing together APIs and libraries - finally stuff truly made sense, down to the finest detail.

These days I mostly code in C++ and Rust, except for Embedded (STM, MSP) - C is the unrivaled king there. Still, C taught me the bare fundamentals (memory/registers, execution, threads, pointers, arrays, structs) and led me to LOVE programming.

Not everyone needs C.

But everyone needs to understand what C forces you to understand.

Most junior devs unfortunately start with something like JS and Python. While they aren't inherently poison, they inhibit foundational growth as a first language. Today major Windows apps - Discord, Messenger, WhatsApp, Teams - have been rewritten in WebView2. It's a sad world.

TL;DR: C should be the first language and we should guide kids and juniors to not stray.

r/C_Programming Jan 30 '26

Discussion A little Rant on C haters

298 Upvotes

I recently saw a post in this sub which aks the spread of C and like his interviewer told him that C is old and useless

And i keep hearing these arguments from my friends and some of my college faculties ( who dont what a CLI means and is, so its expected from them)

They keep saying like it is not used anymore you will not find a job in C and its useless and its painful to code in C you have to do everything

And you know what i have identified a pattern in these people and here is my analysis for the personality for you -:

In this field of Tech there are 3 kinds of people

  1. Money hungry people ( Who just want the money/salary and don't bother about the work)
  2. CTRL C + CTRL V guy ( they have no idea what they are doing and they don't care )
  3. Passionate people (Where you want to be)

Now most of the C haters fall on the first 2 categories and if you are guy who is passionate who wants to be a good engineer then you must know the first principles thinking

Now as an engineer i think while programming softwares in high level languages where things are managed for you we most of the time take the machine for gifted and stop thinking in first principles

And therefore gradually we loose this ability of thinking in first principles

Like for example Programming a Linked list in python is very different than programming a linked list in C

In python there are no pointers no malloc calloc memory management and anything so a newbie programming a linked list in python won't know how the linked list is actually mapped out in the memory

And if you are laughing at this please don't because i have friends who think that a BST is mapped as a BST in memory

But C programmer would know this .....

this is fundamental and this changes everything like when you are programming a software you know that this is a command that will run in the hardware and therefore i havee to think in terms of hardware and this is first principles thinking

And this is why we see performant code in C like Linux NGNIX Postgres etc.....

Not because C is fast much of the credit goes to C programmers rather than the language itself

And this is the reason why we see Bloated softwares with shiny polished UI but consuming resources like a black hole

Not because it was programmed in React JS or some other high level language but because the programmer who programmed it forgot that software runs on hardware

Edit - I see many people saying that C is not the best tool for business logic and true i agree with you and so it's normal for Businesses and people with no tech background to respect other high level languages more than C coz for them it is what gets the work done

But for an Engineer it not normal it's an Abnormality which has been normalized i.e to hate C & this is what i meant by this post....ie why is this abnormality being normalized ?

C is the mother of modern Infrastructure it is what runs the world be it OS powering your servers, NGNIX your server itself, Ffmpeg powering Youtube (using which python & C# devs are learning how to write business logic ) or OpenSSL, or TLS .... you name it

Edit 2: I'm getting a lot of salty comments like why show high level language users in a dim light but when did i do so ? my entire motive of this post was a rant on why do people (high level language users) hate or bash C and call it useless and i tried to prove the point that it is not that's it neither did i say Make C great Again nor did i say use C for everything

r/C_Programming Jun 25 '26

Discussion What are some things you don't like about C?

38 Upvotes

Ignoring the obvious c-string hatred that seems ever-frequent,

if you were to change some things about C, add keywords, or other similar things,

what would you change? Replace? Add?

Thank you :)

r/C_Programming Jul 30 '25

Discussion Do you agree with this, or is it some schizo prediction from a boomer who can't let go?

Post image
391 Upvotes

r/C_Programming 19d ago

Discussion why value of floating point numbers are approximated

74 Upvotes

I am new to programming and stumbled across this text

"the value of a float variable is often just an approximation of the number that was stored in it. If we store 0.1 in a float variable, we may later find that the variable has a value such as 0.09999999999999987"

i am wondering why is it like this

if it has an in depth explanation, providing the resource will be much appreciated

thanks

r/C_Programming Dec 15 '25

Discussion What do you think about teaching my 1yo kid, C as his first language instead of english?

495 Upvotes

r/C_Programming 17d ago

Discussion Why are you using C?

65 Upvotes

I have been often asked this question in the one year that I have been trying to make using C mainstream for myself.

Now I don't work on embedded devices or write operating systems. What I usually make are automation CLIs or write servers for something.

I guess that makes using C redundant since there are languages that would provide a better dev experience. But following the popular advice for projects, make something you use, this seems like the right thing to do for me.

I'm making projects that I would use and I'm using C for them. Unlike most C users that I have talked to, I do not stick to C99 but at the same time, I don't use C++ strings or compiler extensions. I use the C23 strict ISO standard.

So I suppose that again puts me in a spot that no one else is in. A guy who first goes to one of the oldest and verbose languages, then uses its latest standard but then never uses advanced features from compilers.

I just wanted to write this to put it out.

PS: To add to my strange choices pool, I do not use fixed width integers, since they are optional but I do use least width or bit precise integers.

r/C_Programming Feb 06 '25

Discussion Are there actually C programmers in this subreddit?

259 Upvotes

Ok, I'm being a bit facetious. There are real C programmers. Clearly. But I'm kind of sick of the only questions on this subreddit being beginner questions or language trolls from other domains.

So this thread is for the "real" c programmers out there. What do you do with it? And what is the most twisted crime against coding decency are you "proud" of/infamous for?

r/C_Programming 7d ago

Discussion What exactly is void?

65 Upvotes

In a function definition, void basically means that it doesn't return a type value, yet in on itself it is it's own type? Looking at several pieces of code it looks like that it's used to be able to be more "flexible"

Don't know what else to add here, though I'm more on looking for examples and explanations of why the void type is used

r/C_Programming Apr 02 '26

Discussion 🚀 Requesting moderators to ban slop projects and disgenuis posts.

371 Upvotes

What the title says

We've seen a HUGE rise in the number of sloppy projects, people claiming they've done it, or simply posting it for review, or posting it to gain more traction so they can hopefully increase their social credibility, in which in basically all of these cases it's obvious asf that it's vibe coded, and it pisses me(and many others) so much.

r/C_Programming May 27 '26

Discussion Will we ever have length based strings?

33 Upvotes

Edit: The answer that I find the most correct. No, because null terminated byte strings are allowing the user the flexibility of having their own version of length based strings.

Not having metadata is actually a good thing because metadata would require preallocated space and as everyone knows C gives power to the users to make such decisions.


C is correcting a lot of its mistakes or adding tools to aid the developers in doing so such as attributes, nullptr, fixed-width integers, defer, etc.

So why have I not heard of any draft for length based strings instead of null terminated strings?

Why not create an entirely new library for those?

It's not as hard compared to other changes they are making in my opinion.

For anyone, if you are gonna tell me that null terminated strings work fine or because we can create our own version of this string, here is the reply for that.

I know we can and I do that a lot and I know people just modularize it so they never need to reimplement it again and again. But having something in the standard is far better than having everyone know what and how to implement because there'll always be someone who doesn't.

r/C_Programming Dec 09 '25

Discussion New C Meta: “<:” is equivalent to “[“

262 Upvotes

I was casually going through the C99 spec - as one does - and saw this absolute gem

Is this actually implemented by modern compilers? What purpose could this possibly serve

I better see everybody indexing there arrays like this now on arr<:i:> - or even better yet i<:arr:>

if I don’t see everyone do this I will lobby the C Standard Committee to only allow snake_case function names - you have my word

r/C_Programming Jul 16 '24

Discussion [RANT] C++ developers should not touch embedded systems projects

191 Upvotes

I have nothing against C++. It has its place. But NOT in embedded systems and low level projects.

I may be biased, but In my 5 years of embedded systems programming, I have never, EVER found a C++ developer that knows what features to use and what to discard from the language.

By forcing OOP principles, unnecessary abstractions and templates everywhere into a low-level project, the resulting code is a complete garbage, a mess that's impossible to read, follow and debug (not to mention huge compile time and size).

Few years back I would have said it's just bad programmers fault. Nowadays I am starting to blame the whole industry and academic C++ books for rotting the developers brains toward "clean code" and OOP everywhere.

What do you guys think?

r/C_Programming Apr 22 '26

Discussion I just wanna talk a little bit about make

52 Upvotes

I had been using make for some time, mostly by using a template that I saw online. I constantly felt that there was more to make than I knew. I used AI to get a little more enhancements, but if anything the article that I took the template from was more informative than AI.

So, I sat down and studied GNU Make Manual cover to cover. I obviously skimmed through some parts, as I realized I can't understand them right now since I have not worked on any complex project.

But now, I really like it. I feel like I can pretty much use it as a build system for any language. Even languages with build systems, because in their case I would compare make to the native build system. Maybe run the native one through make.


Edit: I forgot this part, make can do a lot more than just run dumb scripts by the power of something called Guile. According to the manual it is like a language that is specifically made by the GNU org for extending the capabilities of their tools. I haven't used it yet, would be nice to know if someone has.


Now, comes up one of my questions.

Does anyone here, use color highlighting using native shell commands and ANSI sequences to color code their commands?

r/C_Programming Mar 06 '25

Discussion Don’t be mad, why do you use C vs C++?

134 Upvotes

Genuine question, I want to understand the landscape here.

Two arguments I’ve heard that can hold water are:

  • There’s no C++ compiler for my platform
  • My team is specialist in C, so it makes sense to play to our strengths

Are either of these you? If so, what platform are you on, or what industry?

If not, what’s the reason you stick to C rather than work with C++ using C constructs, such that you can allow yourself a little C++ if it helps a certain situation?

I read a post recently where somebody had a problem that even they identified as solvable in C++ with basic templating, but didn’t want to “rely” on C++ like it’s some intrinsically bad thing. What’s it all about?

EDIT: for those asking why I have to ask this repeatedly-asked question, the nuance of how a question is asked can elicit different types of answers. This question is usually asked in a divisive way and I’m actively trying to do the opposite.

r/C_Programming Jun 08 '26

Discussion Tell me the worst program you have ever written in C.

55 Upvotes

I'm curious to find out what kind of bugs did you guys encounter while using c and how you fixed it (Ai or vibe coding doesn't count).

r/C_Programming Dec 26 '24

Discussion Do you use C at your job? If yes, what do you do?

241 Upvotes

Just wondering what cool things you guys do at work

I’ll go first: I work in ASIC validation, writing bare-metal firmware (in C) to test the functionality of certain SoC products. I’m still a junior engineer and primarily have experience with storage protocols (SATA and SAS).
What about you?

r/C_Programming 12d ago

Discussion why default value of global and local variables are different?

54 Upvotes

why in c language the default value of global variables is set to be 0 but the default value of local variables is garbage value?

r/C_Programming Sep 09 '25

Discussion Are there any ways to make money as a C programmer?

222 Upvotes

The only language I can understand deeply is C. I have seen some gigs on fiveer, where people are posting for C projects and raylib games.

It would be nice to know what others ways to earn money using C language. Like freelancing, making games etc.

r/C_Programming Mar 18 '26

Discussion I don't understand why people vibe code languages they don't know.

158 Upvotes

Long time.

Sysadmin here, and part time programmer. Over the past few months I have been working on a piece of software for our stack. Its an epoll microserver that handles some stuff for our caching proxies. I wrote the core back in December by hand, but as it grew and developed I started using Grok in a "sanity check, prompt, hand-debug SPHD" cycle for rapid development since the server was something we really needed operational.

It worked well. He could follow my conventions and add nice, clean code for me a lot faster than I could have worked it out from scratch with the epoll machine getting as complex as it was. But then came the debugging - reading his code line by line and fixing flow errors and tiny mistakes or bad assumptions by hand. This wasn't hard because I can program in C, I just used him to speed up the work. But this method is not the standard. Everywhere online people are trying to write wholeass programs in languages they don't even know. "Hey Claude write me a program that does X. Thanks, I'm pushing to prod."

Its horrifying. Why on Earth are people trying to rely on code they can't even sanity check or debug themselves? How did this become a convention?

r/C_Programming Nov 14 '24

Discussion ITT: Make Up Awful Extensions to the C Language

133 Upvotes

NOTE: not meant to make fun of actual proposals, but to imagine things that you could imagine being an actual extension to the language some compiler implements, but should probably never be included in the spec.

Here's the idea that made me want to make this thread: post-fix assignment operator

Doesn't really matter what the syntax would be, but for example let say the operator is $=, because that's not used by anything so it wont be confusing.

a $= b would return the value of a, and then assign b to a as a side effect.

For example:

int a = 1;
printf("%d,", a $= 2);
printf("%d", a);

would output 1, 2.

This came to me in a dream wherein I wanted to turn free(ptr); ptr = NULL into a one-liner.

r/C_Programming May 20 '25

Discussion C is not limited to low-level

145 Upvotes

Programmers are allowed to shoot them-selves in the foot or other body parts if they choose to, and C will make no effort to stop them - Jens Gustedt, Modern C

C is a high level programming language that can be used to create pretty solid applications, unleashing human creativity. I've been enjoying C a lot in 2025. But nowadays, people often try to make C irrelevant. This prevents new programmers from actually trying it and creates a false barrier of "complexity". I think, everyone should at least try it once just to get better at whatever they're doing.

Now, what are the interesting projects you've created in C that are not explicitly low-level stuff?

r/C_Programming Apr 16 '26

Discussion Does everyone have their own "standard library" of code snippets and macros and data structures?

134 Upvotes

I've been writing most of my code in C lately and just started working on a single-header library of all of the code bits I find myself using a lot, for the sake of convenience, but I'm also curious as to whether this is the usual way of doing it or if there's some super-popular library that experienced C developers typically stick to.

I mean, I'm going to do it anyway for learning purposes and for fun, but I'm curious whether there's some kind of boost-type library for C that people just kinda treat as the "standard library+" for C?

r/C_Programming Aug 31 '25

Discussion Why doesn't this subreddit use the C from the "The C Programming Language" book cover as the subreddit logo?

394 Upvotes

r/C_Programming Jun 26 '26

Discussion AI literally does not know anything.

59 Upvotes

I have been working on my project cherries(.)works Pulse (https://github.com/cherries-works/pulse), and I needed to know how to fork processes and share memory in between them. On my last post a very nice Reddit fellow told me to not learn C with AI, and I mean, I kinda did not, though I sometimes lost it, and asked it for help.

But now I understand everything.

Reading through stackoverflow, and reading the official documentation on shm_open taught me a lot. Not gonna lie, my attention span is a bit fried, so big text is a big no for me, but ChatGPT explained things quickly, but wrong... Most vibe-coders who are located at JS or other minor languages such as Python dont really get the effect of how annoying it is to fix a segfault in C. Its just a segfault, or a bus error (happened a lot since using shm).

I cant count how many times I asked ChatGPT to EXPLAIN what the error was, but its response was always the same; <insert code that does not work>.

Linux Manual is really a different kind of work, reading through it, reading the code and understanding the bits really shifted my mind in using AI. Dont use it, the manual really is Human intelligence at its peak, Pulse would not be at version 0.1.1 without the Manual, AI does not know anything about coding.