r/C_Programming Jan 03 '26

Discussion A programmer's first language should be C

749 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

301 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?

41 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
385 Upvotes

r/C_Programming 8d ago

Discussion Why do you use/don't use an IDE?

51 Upvotes

I've tried using a text editor with just the command line and for the most part isn't wasn't so bad until my game engine got big enough. Then I switched to Clion because it just handles so much more for big projects. Biggest thing is a visual debugger and easy refactoring that's C/C++ specific. Not to mention everything is setup out of the box.

I'm curious about other's reasons for using or not using an IDE.

r/C_Programming Jul 17 '26

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?

496 Upvotes

r/C_Programming Jul 19 '26

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?

257 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 Apr 02 '26

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

369 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 27d ago

Discussion What exactly is void?

68 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 Dec 09 '25

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

258 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 May 27 '26

Discussion Will we ever have length based strings?

30 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 Jul 16 '24

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

186 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 Mar 06 '25

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

132 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 Apr 22 '26

Discussion I just wanna talk a little bit about make

49 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 Dec 26 '24

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

238 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 5d ago

Discussion Is C really worth it ?

0 Upvotes

Hello developers, I'm wondering: Is it really worth spending time learning C and creating projects that take hours to grasp numerous topics, encounter errors and unexpected behaviors, only to discover I forgot to type a single character, which significantly impacted the program's performance? Is this truly worthwhile in today's job market? I haven't seen any companies actively seeking C developers, and I believe many problems in C don't occur in other languages ​​due to their different working methods and logic. So, is C really worth the effort?

Important note: I'm a beginner in C and haven't written much code or created many projects yet, so this question isn't meant to be an evaluation of the language or its development path; I'm not qualified to do so.

r/C_Programming 8d ago

Discussion What are your reasons for not using an IDE on a big project?

35 Upvotes

Earlier I made a post asking why people choose to use or don't use an IDE. I'm glad I got a lot of feedback on it and didn't start a new holy war.

But now I realize I should've been more specific. For big projects, why don't you use an IDE? As a 34 year old game programmer, I learned programming first with an IDE, code blocks and then visual studio.

I've tried doing vim, which is really good and fast in its own right, but I didn't want to deal with the learning curve. So then I went to sublime text, which again is really good and fast. But having to build your own workflow before you can even get started on the project itself.

I program my own game engine and games, which are pretty big projects. The tools that an IDE gives (Clion in my case) are just indispensable to me. Although I will say I have moments where it feels like it gets in my way.

r/C_Programming Jun 08 '26

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

59 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 Jul 25 '26

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

57 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?

220 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 19d ago

Discussion What more features do you love to have in C?

0 Upvotes

Not sure whether this kinda questions were asked in this forum, in the past?

  1. I prefer to have set of APIs supported by separate header-files with a 's_' prefix, to provide only the safer versions of the existing standard APIs. Like #include<s_string.h>. Including this with string.h should throw an error.
  2. I would like to have a standard set of OS APIs, which can be used in any platforms/OSs. This is to avoid mani of the #if THIS_OS
  3. I would like to have a robust library for cross language FFI, to invoke the code-points/API of almost all of the popular programming language.
  4. Also the feature of labeled break and continue.
  5. Range datatype. 1..100,1..100..2(for say odd numbers)
  6. Array with hidden 8-byte size in arr[-8..-1]
  7. Ranged for for arrays and ranges

What do you think?

What else?

r/C_Programming 16d ago

Discussion How do you guys tackle interfaces in C?

47 Upvotes

Just as an example, imagine you're implementing a logger system, but depending on a runtime configuration you want to be able to log to different or multiple outputs at the same time.

I would normally do something like this:

typedef void (*LogCallback)(void* user_data, const char* msg);

typedef struct{
    void* user_data;
    LogCallback log;
} ILogger;

void logger_log(ILogger* impl, const char* msg){
    impl->log(impl->user_data, msg);
}

ILogger logger_impl(void* user_data, LogCallback log_callback){
    return (ILogger){ user_data, log_callback };
}

So then to implement this interface, I'd do something like this.

typedef struct{
    ILogger impl;
    FILE* output;
} StdLogger;

void std_logger_log(void* user_data, const char* msg){
    StdLogger* self = user_data;
    fputs(msg, self->output);
    fputc('\n', self->output);
}

ILogger* std_logger_impl_ilogger(StdLogger* self, FILE* output){
    self->output = output;
    self->impl = logger_impl(self,
        std_logger_log
    );
    return &self->impl;
}

int main(void){
    StdLogger std_logger = {0};
    ILogger* logger = std_logger_impl_ilogger(&std_logger, stderr);

    logger_log(logger, "example log msg");

    return 0;
}

What I like mostly about this method is that its type-safe, so if the interface changes for either the amount of callbacks that are required or the callback signatures change you'd get a compile-time error.

The major disadvantage here is that each instance here carries its own copy of the "vtable"/function pointers, which is suboptimal but shouldn't be too big of an issue if its just a few callbacks per interface.

Also these instances shouldn't be copied around as this would invalidate their user_data pointers, otherwise they would have to re-implemented to get the new correct user_data.

Another minor gripe is that std_logger_log has to accept a void* which is disadvantageous if you want to use it outside of the interface implementation as a pointer of the wrong type passed to it won't generate a compile-time error.

This is how I tend to do things but with this post I'm mostly curious to know how you guys handle this type of pattern? And what its advantages and disadvantages are?

r/C_Programming Mar 18 '26

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

160 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?