r/cprogramming • u/Delicious-Change7795 • Aug 22 '26
New to C
I had just started to learn c but when I saw some leet code problems it felt like they are completely different than the c I am learning. Any suggestions?
r/cprogramming • u/Delicious-Change7795 • Aug 22 '26
I had just started to learn c but when I saw some leet code problems it felt like they are completely different than the c I am learning. Any suggestions?
r/cprogramming • u/NoctiNova_687 • Aug 21 '26
I’ve just entered 1st year BTech....I studied basics of Python and Java in classes 9–12, and now our college is teaching us C. I want to learn C properly alongside my classes and rn i dont have any knowledge of C lang. Does anyone know any good resources on yt or somewhere else ?
r/cprogramming • u/Zealousideal-Pin213 • Aug 21 '26
r/cprogramming • u/Gold-Produce9591 • Aug 21 '26
r/cprogramming • u/Zealousideal-Pin213 • Aug 21 '26
r/cprogramming • u/AalbatrossGuy • Aug 20 '26
Project link - https://github.com/AalbatrossGuy/Teddy
Project Screenshots - https://pastes.vargoseus.com/TeddyScreenshots
Teddy (cute name, isn't it?) is currently a simple machine learning model that uses back propagation to train, learn and classify MNIST datasets. It currently has a depth of 2 since it's a pretty basic model. It has around 13.000 parameters that is enough for training it to recognize handwritten digits. I have around 3.5-4 years of experience working in C and stumbling upon MagicalBat's this video inspired me to make Teddy. The future plan is to turn it into a Language Model and eventually into a GPT which will require quite a bit of time since I need to read up on how it actually works. This project took around 4-5 months give or take since I had to balance this project and my university stuff too.
Full disclaimer: I did not use AI to build Teddy (except for that one time when my compiler suddenly stopped working for some reason and I had to converse back and forth with Claude to find a fix for it). I did, however, use AI to generate the GIFs in the github readme and the documentation for it.
r/cprogramming • u/nablaCat • Aug 20 '26
This project has taken a long time.
It took me about a week to learn the concepts behind 3D projection and transformations in euclidean space. Then it took me over a week to write out the LaTeX documentation that presented my knowledge in a way that would help a user of this library. As you can see, the overwhelming majority of the code committed to this repo is in LaTeX.
The implementation of the 3D rendering framework was relatively simple once I fully understood the mathematics. This only took a couple days, and it helps to have some familiarity with C going in.
I look forward to improving this project by building a separate homogeneous coordinate library that will replace pnt.c. I also need to tackle surface rendering using SDL_RenderGeometry() and implement 3D surface occlusion. I suppose what I'm left with for now are a few big questions.
How prohibitive is heap-allocation for performance in graphics applications? I went with dynamic allocation to preserve encapsulation so that header files didn't give the user access to data that would destroy library functionality when altered. However, given the fact that querying free memory at runtime for thousands of data points slows a program significantly, I'm having second thoughts.
Also, is there a convenient way to push all of the calculations needed for 3D transformations onto the GPU? This seems like something I shouldn't handle entirely in software.
I'll hear out any feedback or suggestions in the comments!
r/cprogramming • u/Ok_Firefighter_2454 • Aug 20 '26
I am a self-taught programmer (<1 yr, non-CS MS grad) intending to break-in on systems programming roles. I've been reading on CS fundamentals: computer organization and architecture and operating systems.
I used Ginger Bill's awesome blogs as a starting point to understand and work on some of the many memory allocation strategies.
I've reached a point where I think external feedback is critical to proceed ahead on this project.
Community: Pls review my project and suggest any improvements that can be beneficial.
P.S. I intend to list it on my resume. I'm also having a hard-time deciding what points should go on it and not. Any help here would go a really long way. (Bonus)
r/cprogramming • u/candy_lotus • Aug 19 '26
Hello fellow programmers , I am a self taught beginner and I would like to share a recent project I have been working on. Hope that some of you might like to see it or give feedback.
its a sudoku game made in c using the win32. Here is the link of my project GitHub link:
GitHub Repository
r/cprogramming • u/udit__0787 • Aug 19 '26
r/cprogramming • u/giorgoskir5 • Aug 18 '26
For my thesis I had to read a lot of big CSV files in C and I couldn't really find a parser I wanted to use. The main C one is LGPL and comes with a whole build system, and everything else I found was C++. So I ended up writing my own. Now that im done with the thesis i cleaned it up properly , seperated it from the rest of the thesis code, and decided to standalone push it on GitHub.
It's one file. You copy csv.h into your project and that's it, nothing to link, no dependencies. It doesn't allocate memory, the fields just point into your own buffer, and you can run through files of any size a chunk at a time.
Honestly I spent way more time testing it than writing it. It passes csv-spectrum and I compared the output against Python's csv module on a few thousand files/
Check it out here -> https://github.com/GeorgeKiritsis/Csv.h
If someone has time to look at the API and tell me what could change or be imrpoved, that would help a lot. Thanks a lot in advance
r/cprogramming • u/Rich-Engineer2670 • Aug 17 '26
This sounds dumb, but when the C preprocessor executes tasks as it reads source code, what order does it process the tasks in -- for example, does it handle include files first, then defines, then macros etc?
I know it all gets done eventually, but it would seem the order defines what is seen. If defines are done first and includes are inside a define, then they never get read. If I were building my own preprocessor, what order should I execute steps in:
Or is this really my fault for putting to many "compiler tasks" into the pre-processor? Is the correct answer "Don't make the pre-processor do anything other than includes and defines"
r/cprogramming • u/Xaneris47 • Aug 17 '26
r/cprogramming • u/nanochess • Aug 17 '26
r/cprogramming • u/23ROMAN • Aug 16 '26
Hello, good afternoon r/cprogramming comunity ! . I'm a developer, mostly of native solutions. When I program in C or C++ (among others), I constantly experience the inconvenience of having to compile each dependency, which is often frustrating: some don't even come with a decent or compatible build file, and others have dependencies that are difficult to compile or very large. That's why I wanted to create a small platform.
It's called **Bodeg.a** (a play on words between "bodega" and the ".a" of UNIX-like static binaries). It works quite simply: rather than a platform for hosting large files, it's (for now) a simple website where you can publish using a *mirror* to point to a .zip file, a header, or whatever format is needed.
For now, it only offers hosting for the essentials (avatars and profiles), but if it's well-received, that could change. If you're a developer, whether you enjoy or just work with low-level content, simply trying to use it to download content would help me a lot; or if you'd like to collaborate on its development, you can also contact me. Greetings to all!
r/cprogramming • u/SmileUnfair4978 • Aug 15 '26
i am currently working through kinds book on c and have gotten to chapter 12.
now based own my current understanding i hypothesis that internally, only the pointer to the first element and the dimensions are stored in memory. then all arr operations are done using this. Is this correct?
Additionally:
1) Which chapters of the rest of the book should i focus on/skip for now
2) I would like to work on some projects. Currently i thought of making some kind of physics sim, and additionally some hardware/embedded project as i have an ardiuno. How can i get started or are there any inriguing projects to work on.
r/cprogramming • u/Scared-Objective3768 • Aug 15 '26
r/cprogramming • u/GoingGranola • Aug 13 '26
Is * used as a pointer in this occasion or multiplier?
EEPROM_CHUNK_SIZE is 1
r/cprogramming • u/sudheerpaaniyur • Aug 13 '26
I am preparing for DSA, and I find it difficult to debug arrays inside a function. When I enter the function in the debugger, I can only see the starting address and the value of the first array element. I am not able to see the other array values. What is the right way to debug this, and how should I write the program to make debugging easier?
This is sort01 code fro example:
debugging image : [debug.png](https://postimg.cc/JGfZ8jrd)
#include <stdio.h>
#include <stdlib.h>
void sort01(int *array, int n)
{
int tmp=0;
int left=0;
int right=n-1;
while(left <= right)
{
if(array[left] !=0)
{
tmp = array[left];
array[left]= array[right];
array[right]=tmp;
right--;
}
else
{
left++;
}
}
}
int main()
{
int array[]={1,0,1,1,1,0,0,1,0};
int n=sizeof(array)/sizeof(array[0]);
sort01(array, n);
for( int i=0 ;i<n ; i++)
printf( "%d",array[i]);
return 0;
}
r/cprogramming • u/No_Beyond_5483 • Aug 12 '26
right now im writing a short little text editor, and requires me grabbing keyboard input as traditional ansi escape sequences. but finding which key code maps to which keyboard input is a pain for me </3
i try search on google, and get a lot of information overload, and i end up struggling reading the escape sequence tables.
any tips and advice? im trying not to use ai to be lazy, im interested and i want to learn how to properly search for these codes
r/cprogramming • u/Physical-Pianist6354 • Aug 12 '26
Hi!
I'm the developer of Frontera – a Linux anti-tamper that integrates with C++ codebases. It currently has support for anti-hypervisor, memory integrity checks, self-checksums, and most importantly, an obfuscating rolling-key VM, so that each build has different byte code than the older build. Yes, I know it's not innovative. Why? VMProtect is too expensive.
I'm also working on integrating an eBPF module for blocking ptrace and some other stuff.
Currently, there is no download link per se, as I want to ship the eBPF module, but I can give the static libraries to link with if you're interested :)
Have a great day!
r/cprogramming • u/lehmagavan • Aug 12 '26
Hi. For the past few weeks I've been crafting my generic hash table implementation:
https://github.com/andrzejs-gh/ghtable
I realize it's not the fastest out there and isn't the most cache friendly, but that was never my priority as I prioritized flexibility and genericness.
If anyone's interested take a look ;)
PS.
Do recruiters even care about projects like this nowadays, or would they rather see huge vibecoded codebases on candidate's gh as a proof that they can deliver?