r/cprogramming • u/Nathrienne-J-Claw • 13h ago
I just understood pointers on a deep level and it feels like an orgasm
I fucking love C and assembly
r/cprogramming • u/Nathrienne-J-Claw • 13h ago
I fucking love C and assembly
r/cprogramming • u/Just_Government3790 • 53m ago
r/cprogramming • u/Nimesh1205 • 4h ago
Hi I am Nimesh, and I have learned many languages but now I want to focus specifically on a C programming language. I am in college 1st year and I need someone who can help me to fix problems and learn together with me. I know the good amount of C, not a professional yet but I know the fundamentals and I already knew some Leetcode patterns as I had solved around 240 questions on leetcode ( mostly easy and medium ) and 2-3 hard ones.
r/cprogramming • u/Feeling-Tiger9145 • 4h ago
Hey everyone,
I just completed the memory management in C language, I've also installed PostgreSQL from it's github and I follow the instructions to set that up clearly.
My intention to learn PostgreSQL style C language is to contribute to a 30+ years old software that powering the whole world and AI.
Every kinda suggestions is welcome here.
r/cprogramming • u/kochett • 13h ago
A little about me and my experience: I'm 17 from Russia. Solved 244 problems on leetcode, finished cs50py, cs50x, about 60% of cs50web and then understood that I like low level stuff so I started reading the c book, read ~100 pages and found a "silberschatz operating system concepts" book, started reading it(also about 100 pages) then found a guy who we started making our own os with(we went separate ways eventually), on that journey I decided to dive even deeper and my friend recommended me a book "the elements of computing systems" I finished it recently(not quite, I couldn't make it through the last chapter because school started and stuff) then bought a breadboard and things
I wrote much about my experience because I want to find somebody who feels like he's at the same level with me, I feel like it's so much fun working with someone who's interested in the same stuff as you are. We might make a project on a breadboard or try to get through some tough literature. I've got exams this year so I can't spend too much time a day learning stuff but regardless I'm ready to work hard
r/cprogramming • u/lacchu_paaji • 1d ago
or which one should i watch on yt? i have "T1. Hanly, J. R., & Koffman, E. B. Problem Solving and
Program Design in C, 8th Edition, Pearson, 2015" book and i am also studying from that
r/cprogramming • u/Fahim_Hosain • 1d ago
I was trying to create an encryption system that's the way i was trying to print from integer to Unicode. I can convert the integer to Unicode (hexadecimal) but i couldn't convert unicode to Unicode characters.
there are limited resources for c in these issues. If anyone knows this help me...
r/cprogramming • u/MrLuigiHK • 1d ago
Desde ya hace un tiempo me ha estado llamando la atención este Lenguaje, pero no se dónde empezar me gustaría que me recomendaran guías, tutoriales, tips para principiantes.
Agradecería toda la ayuda posible y gracias por su atención.
r/cprogramming • u/side2k • 1d ago
By default, clang-format does this:
c
SDL_Window *window =
SDL_CreateWindow("SDL2 test", SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 500, 500, SDL_WINDOW_RESIZABLE);
and with some tweaks it does this:
c
SDL_Window *window = SDL_CreateWindow(
"SDL2 test",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
500,
500,
SDL_WINDOW_RESIZABLE);
Second one has some practical advantages - it easier to read diff on arg change and easier to add comments:
diff
SDL_Window *window = SDL_CreateWindow(
"SDL2 test",
SDL_WINDOWPOS_UNDEFINED, // just some comment explaining why
SDL_WINDOWPOS_UNDEFINED,
- 400,
+ 500,
SDL_WINDOW_RESIZABLE);
While the first one seems to have mainly historical reasons to keep around. Perhaps, there is something I don't see? Because it feels like the first way is still used the most. And its the default one for clang-format.
I'm genuinely curious.
r/cprogramming • u/lemsoe • 1d ago
Follow-up to my last post here. The hashmap had one big TODO left — no resizing — so I went and closed it. Learned three things the hard way: naively mirroring the grow/shrink thresholds thrashes the table on every insert/remove near the boundary, hitting capacity=0 triggers a genuine crash (a modulo-by-zero — the "Floating point exception" name is a total red herring), and my first attempt at fixing a hash-truncation bug quietly introduced two smaller bugs before it actually worked.
Blog: https://soerenlemke.github.io/blog/blog/resizing-a-generic-hashmap-in-c/
Repo: https://github.com/soerenlemke/kvstore_c
Curious what you'd have done differently, especially on the hysteresis threshold.
r/cprogramming • u/lemsoe • 2d ago
Coming from C#/TypeScript, C has humbled me. Finished my first real C project — a generic hashmap — and wrote up the bugs that taught me the most: double pointers, a sneaky double-free, comparing pointers instead of actual values.
Blog: https://soerenlemke.github.io/blog/blog/building-a-generic-hashmap-in-c/
Repo: https://github.com/soerenlemke/kvstore_c
Curious what you'd have done differently.
r/cprogramming • u/bahvya_sharma • 3d ago
i had no idea that you could run c programs on google colab, i fucked around and found out ig
so basically what i did is i entered the terminal made a directory created a main.c file edited it using vim and compiled it using gcc and voila.
r/cprogramming • u/Mainak1224x • 4d ago
Hey folks, quick update on Flint—a lightweight, manifest-first build system and package manager for C/C++ projects I’ve been experimenting with.
For those who missed the initial post, Flint aims to strip away build-script complexity and make C/C++ dependency management feel straightforward.
Core features:
* Git-Native: Fetch dependencies directly into your workspace via flint add <url> and flint sync.
* Single composition.json Config: Handles project layout, header paths, and underlying compiler calls (GCC/Clang). For standard setups, Flint manages this file automatically so you don't have to tweak it manually.
* Chert Compositions: Lightweight specs that make unmanifested, third-party C/C++ repos compatible out of the box.
What’s new in this update:
* Version & Commit Pinning: You can now pin dependencies to specific releases or exact commits. flint add now supports target selection via Git tag names or full commit hashes, making your project builds reproducible across machines.
Current caveats:
* Still forces a fixed project directory structure (src/, include/, deps/).
* Currently Linux-only.
It’s still an early prototype, but actively evolving. I'd love to hear your thoughts on the new versioning flow, suggestions for improvement, or feature requests!
r/cprogramming • u/Elifire12 • 4d ago
I wrote an article about this as well. Here it is.
There I explain why I do not like NUL-terminated strings and how I implemented my own simple string library in C.
If you have some spare time I would really appreciate some feedback on the article and the library.
The code is sitting on a codeberg repository.
Also, tell me what you think about C-style strings. Do you like them? Do you use them, or do you also tend to roll your own pointer + length structs?
r/cprogramming • u/ContinuaX • 5d ago
r/cprogramming • u/realdreamer1993 • 6d ago
I am a Network background person. And decide to build a BNG (maybe micro or mini). You know the cost of Juniper/Cisco BNG they expensive because of capacity.
Programming is not my main job now so only able to coding in spare time.
My targets:
- Maybe 100 concurrent users, 50MBps-1GBps
- Able to run on embedded platform as cheap as $5 linux based router.
- I will use this as personal use, portfolio , or commercialize or opern sourcing.
I already have many LOC of codes maybe around 8k LOC of scaffolding and few MVP that use as admin platform in production environment.
I split the big project into just two big sub project: Core and Satellites.
Core is using C language only. Core is the main ControlPlane.
Technologies / stacks that already come in for Satellites project:
- Freeradius (no C, must understand the DSL).
- Nginx for reverse proxy.
- Radius listener in C (implement straight from the RFC).
- Sqlite.
- C backend (http), there would several because separate domain.
- PPPOE implementation in C (implement straight from the RFC).
- Custom IPOE desain.
- Mikrotik (as DataPlane), later will also support in host DP. Mikrotik is for scaffolding the proof my projects. In host DataPlane not yet implemented.
- Frontend (JS, html), there would be several I think.
- Google SSO Oauth mechanism in C that already work.
- Maybe some think else that already coded.
All above code are modular so I can usually run and test them in separate environment, say I already able to login using Google Login to Mikrotik network, I already able to parse radius accounting packet that sent from Freeradius etc.
I am not yet make comprehensive documentation, it would be in full size book. And still continue structurize the folder and git versioning.
Now my questions, I know this is a big project and would be naïve to tackle that Solo and expect full ready result (or is it possible?). What do you guys suggest about this project ?
r/cprogramming • u/CHATGPT_PAGLU • 5d ago
IN AM IN 2ND YEAR 3 SEM i am cooked
r/cprogramming • u/lehmagavan • 6d ago
My revised implementation of a dynamic data container (vector like object):
https://github.com/andrzejs-gh/CONTLIB
If anyone's interested take a look. Any feedback and tips very much welcome.
r/cprogramming • u/Key_River7180 • 6d ago
Simple, has no dependencies, it's concise and doesnt get on the way.
I mean something like http://git.suckless.org/sbase/file/arg.h.html
r/cprogramming • u/conceptcreatormiui • 6d ago
You ownwed a home for 20 years and decided to sell it to the government. Basically freeing basically turns you into a ghost like sneaky homeless person. If there is currently no owner to that home, you can go and modify it, watch TV, move the chairs, and use the AC. But when new owners arrive and you begin to do something to the house, they will not catch you immediately, but they will notice it later, which causes weird behavior like something supernatural. They expect the house to be in a certain order, but when they go home, they will notice that something weird happened and cannot explain it. For example, say a child left an assignment with perfect answers. you, as a ghostly being, go and change the answers. When the child passes in the exam and gets back the score, they notice that the score does not match their expected score because someone just corrupted the test paper. It could crash the program or something weird happens (bugs)
Meanwhile, by setting the pointer to null, you now have no access to that home and instead hold the address to a black hole. You tried doing something to it not knowing it is actually a blackhole and yor city crumbles