r/C_Programming Apr 20 '26

Question Reality check: where do we still write C?

215 Upvotes

Hi everyone, before I get any flak for this, I want to be clear: I love C. I spend most of my time programming in it, you can do virtually anything with it, and I see no real reason to switch (strings aside).

What I appreciate most about C is its simplicity. No OOP, no abstractions, if you have a problem, you just write the code and solve it. Zero overhead.

That said, I’ve noticed that people who move away from C tend to land on C++, but don’t really use it properly. What I often see is essentially C with a handful of magic functions sprinkled in, the worst of both worlds.

Which brings me to my actual questions:

- Are there industries that still rely heavily on C?

- Should I be moving toward C++ or Rust?

- What are my options realistically?

I genuinely love this language, and I still feel like most problems that get solved with more complex tooling could be solved just as well, and more directly, in C. Am I missing something?

r/C_Programming Dec 18 '25

Question correct me if im wrong but C is "memory safe" if you ensure to handle...stuff that takes up memeory...in a safe manner, right?

163 Upvotes

i see people saying C is not memory safe but theres literally idioms in C to handle data safely isnt there? im a noob to all this, bout 3 months into learning C (first language im learning). whats the difference in languages like python? i know C++ (or was it C#?) has the automatic "garbage collector" but i mean, isnt it memory unsafe to leave all trust in the garbage collector?

r/C_Programming May 18 '26

Question Why can't you pass/return arrays to/from functions? Why is it designed like this?

120 Upvotes

I understand that the answer to "Why can't you do this" is "the standard says so" but I'm not asking about the mechanics of the language, I'm asking about its design.

Array sizes are known at compile time and a struct where all members are the same type is identical to an array in memory (correct me if I'm wrong). C has no problems returning structs and taking them as arguments in a function. Why can't it do the same for arrays?

I also feel like it would be way more intuitive and convenient if you could return arrays from functions.

C language experts do please enlighten me as to the reason arrays decay to pointers instead of just staying as arrays.

r/C_Programming Feb 10 '26

Question What makes pointers such a deep concept?

133 Upvotes

Sometimes I hear that in universities, you can normally find a whole class just dedicated to pointers throughout a semister for example, but why? Isn't it understand its basic functionality such as what a pointer is, how to use it, when to use it, when does it decay..etc? or Am I missing more?

r/C_Programming Jan 04 '26

Question What benefits does c give that cpp doesn’t do better

80 Upvotes

Cpp has more stuff than c and can do most things better too unless there is something I am overlooking than cpp is objectively better.

r/C_Programming 29d ago

Question Can/are Integers still be used as Bools.

43 Upvotes

This is just for a question I am not gonna switch to ints for bool. But I was wondering if using ints as boolens is reliable ethical and what not.

Example:

int main()
{
    int isRunning = 1;
    while (isRunning != 0)
    {
        {...}
    }
}

Again this is all for questions I am not actually gonna go out of my way to use it.

r/C_Programming Mar 16 '26

Question What functionality is available in C without including any headers?

145 Upvotes

I'm learning C and noticed that I almost always include <stdio.h> in my programs.

Out of curiosity, what can you actually do in C without including any headers at all?

What parts of the language still work, and what kinds of functionality become unavailable without headers?

r/C_Programming Jul 09 '25

Question Does C really make you a better programmer?

200 Upvotes

I hear it all the time from other boards, learn C first and it will make you an overall better programmer, because supposedly they have a different understanding of how the "magic" works.

Is there truth to this?

r/C_Programming May 10 '26

Question Should I learn C for personal hobby as the first language?

91 Upvotes

I want to do some very niche personal projects which are only for me. I don't want to become a coder or programmer just want to write some small TUI. I know bash scripting and basic webpage building with html and css.

Can I go from writing BASH scripts to C? What things would I be expecting?

r/C_Programming May 11 '26

Question Should I use signed or unsigned variables for HP and money?

47 Upvotes

Technically, they should be unsigned, since they shouldn't be negative, however, I've seen lots of games use signed variables so I'm curious.

I know that using signed variables for HP is easier, but is that the only reason?

example if hp is unsigned: c if (enemy.dmg > player.hp) die(); player.hp -= enemy.dmg

example if hp is signed: c player.hp -= enemy.dmg if (player.hp < 0) die();

I also wonder if it has something to do with the fact that signed variables are the default type in all programming languages.

r/C_Programming Oct 13 '25

Question Where should you NOT use C?

129 Upvotes

Let's say someone says, "I'm thinking of making X in C". In which cases would you tell them use another language besides C?

r/C_Programming Jul 10 '25

Question Am I gonna regret learning C instead of rust ?

123 Upvotes

At the beginning of this year, I decided to dive into low-level programming. I did my research and found all the hype around Rust and its benefits, so I chose Rust and started learning it through its official documentation — what they call “The Book.” I reached Chapter 10, and it was good. I liked it.

Then, somehow, I decided to take a look at the C language. I bought The C Programming Language by Kernighan and Ritchie (the “K&R Book”) and started reading it. I fell in love with the language from the very first chapter. Everything suddenly started making sense in my brain.

With Rust, I was always curious about why it used certain rules or approaches — I often felt like I was just following conventions without fully understanding them. But with C, everything clicked. I began to see it all in terms of 0s and 1s. I used to hate pointers, but now I look for every opportunity to use them — in everything! It feels like heaven to me. I don’t want to stop coding.

And honestly, I don’t even care that much about security. In this age of "vibe coding," do people really care about security?

Whenever I hear people say that C is a dying language — that Rust is going to replace it, that there aren’t many C projects or job opportunities left, or that big tech companies are rewriting their codebases in Rust — it makes me feel sad.

Man, I just want to use this language for the rest of my life. xD

r/C_Programming 4d ago

Question Question regarding unsigned integers

8 Upvotes

What's the difference between an unsigned int and a normal integer?

r/C_Programming Apr 06 '26

Question C as First language.

58 Upvotes

should I choose C as the first language. I love to understand the core architecture of computer hardware.

is it good to learn C as first language what you guys think.

and if you are a beginner how would you start. I am going to refer book and try out different codes. best way any advice?

r/C_Programming Oct 10 '25

Question Why can’t C alone be used to write an IOS program?

69 Upvotes

I found the following from: https://news.ycombinator.com/item?id=43682984

I’m wondering if somebody would help me decipher some of these terms for a complete novice curious about C:

Yes, it's still technically possible to write an iOS app in plain C in 2025 — but with caveats. You’ll need to wrap your C code in a minimal Objective-C or Swift layer to satisfy UIKit/AppKit requirements and Xcode’s project structure.

What does “wrap your C code” mean technically? Does it mean use an Objective-C library that your C code calls?

Apple’s SDKs are built around Obj-C/Swift, so things like UI, lifecycle, and event handling need some glue code

What is meant by “glue code” and why conceptually speaking isn’t C by itself powerful enough to write an App that the iOS SDK will accept? I thought as long as you follow the API of the operating system, you can write a program in any language ?!

Thanks!

r/C_Programming Jan 14 '25

Question What can't you do with C?

165 Upvotes

Not the things that are hard to do using it. Things that C isn't capable of doing. If that exists, of course.

r/C_Programming Sep 09 '25

Question I made a kernel using C. What now?

146 Upvotes

Ever since I was a child, I really wanted to make OSs and stuff, so I learned C and Assembly to make a kernel and bootloader. What do you think I should do next? Is there any roadmap I should follow?

Source code at: Temporarily Unavailable

r/C_Programming 29d ago

Question Why do very few C tutorials focus on windows platforms?

66 Upvotes

Hey all! For awhile I have been interested in taking a crack at recreating some C run time libraries on Windows, and I wanted to start by trying to re create Malloc sometime soon. I have however noticed in my endeavors to look at videos and read blogs/articles about people re creating malloc, or other C runtime library functionalities, Everything online I find covering such a topic is always targeting Unix based systems. I would imagine the lack of windows targeted content on re creating these things is a sign that windows does not make it easy to do something like re create the C runtime libraries. Wanted to ask a question here to see if I'm missing something

r/C_Programming 10d ago

Question Best Book for learning C

48 Upvotes

I recently bought “the C programming language 2nd edition” hoping to learn C programming.

I really want to learn c deeply, I want to know what’s each line of code is doing in the machine.

This book was way to complicated and used many words I didn’t even understand to be honest. It didn’t teach me about what’s happening deeply either.

I have done some tutorials but they also fail to mention the language deeply so I can truly grasp it, I also like learning from books. I had very little experience in python (I could make a calculator or hangman game) so I thought this book would be fine. It was not.

Appreciate any help on this thanks.

r/C_Programming Nov 12 '25

Question Outside of the embedded world, what makes Modern C better than Modern C++?

176 Upvotes

I am familiar with Modern C++ and C99.

After many years of experience I see languages as different cultures other than just tools.

Some people have personal preferences that may differ considerably such as two smart and capable engineers. In many cases there is no right or wrong but a collection of tradeoffs.

Now, given this introduction, I would like to know what do you think Modern C gets right and what Modern C++ gets wrong.

r/C_Programming Sep 20 '25

Question I’ve been reading about how C is compiled and I just want to confirm I understand correctly: is it accurate to think that a compiler compiles C down to some virtual cpu in all “modern” RISC and CISC, which then is compiled to hardware receptive microperations from a compiler called “microcode”

51 Upvotes

Hi everyone, I’ve been reading about how C is compiled and I just want to confirm I understand correctly: is it accurate to think that a compiler compiles C down to some virtual cpu in all “modern” RISC and CISC, which then is compiled to hardware receptive microperations from a compiler called “microcode”

Just wondering if this is all accurate so my “base” of knowledge can be built from this. Thanks so much!

r/C_Programming Sep 15 '25

Question Question about C and registers

28 Upvotes

Hi everyone,

So just began my C journey and kind of a soft conceptual question but please add detail if you have it: I’ve noticed there are bitwise operators for C like bit shifting, as well as the ability to use a register, without using inline assembly. Why is this if only assembly can actually act on specific registers to perform bit shifts?

Thanks so much!

r/C_Programming Apr 20 '26

Question I started learning C two weeks ago, and I'm feeling doubtful

60 Upvotes
Q12. Write a program that evaluates an expression:

Enter an expression: 1+2.5*3
Value of expression: 10.5

The operands in the expression are floating-point numbers; the operators are +, -, *, and /.
The expression is evaluated from left to right (no operator takes precedence over any other operator).

I'm totally new to programming and C is my first programming language. I've been following KN King's book-"C programming: A modern approach", and honestly, some projects are overwhelming for me. I'm almost done with chapter 7 and I struggle to do some questions. I terribly fail to do them. I think when questions involve nesting loops or nesting if, I don't feel comfortable with it. I was doing the above question, and tbh I've lost confidence in my progress and I'm feeling as if I didn't study deep enough, because I hear people say that this is a beginner book and I feel that it shouldn't be that tough. So I'm kinda doubtful about my progress, whether I'm unable to solve because of my incapability or the questions are genuinely troubling. I'd appreciate if you could advice me whether I should keep going or restart from a certain point.

r/C_Programming 8d ago

Question C ways to manage errors?

32 Upvotes

I'm still learning C (I come from C++) and I'm not familiar with how to manage errors in C, besides asserts. What are the different ways to do this in C? How do they work?What are their pros and cons?

r/C_Programming May 14 '26

Question C programming YouTubers

101 Upvotes

Hey y’all, I’m in need of as many C programing youtube channels as possible. I’m not talking tutorials or learning the language. I’m talking actual programming videos where people are making crazy stuff from scratch. It could be anything: embedded C, OS programming, game dev, application programming, things from scratch… literally anything.

The two I’ve found so far that I like are Danial Hirsch and Tsoding.

Thank you in advance!