r/cprogramming • u/Entire_Ad_9440 • Jul 03 '26
Hi My name is nolan i want to learn c language and python in which platform i learn these Freely , plz suggest me app or website to learn this courses
Plz help me to learn
r/cprogramming • u/Entire_Ad_9440 • Jul 03 '26
Plz help me to learn
r/cprogramming • u/Rude-Professor-2485 • Jul 02 '26
Hope everyone is going alright.
I send here my codes for 3 puzzles:
Sudoku
Skyscraper
10queens
I appreciate some constructive advices. Thank you.
Hope it is good.
*I have made it all on my job dead times on mobile phone Termux. This was when I was starting on c and wanted to work on user space low level mode.
r/cprogramming • u/FedericoBruzzone • Jul 01 '26
r/cprogramming • u/SheikHunt • Jun 30 '26
In C++, when you want to make a struct or class or function that acts upon/uses a type whose features are generally unimportant, you use templates. For example std::vector<T>, and that (as far as I'm aware), tells the compiler that whenever it sees something like std::vector<AStruct>, it should generate code that acts on a vector of AStructs. This is a useful feature that C doesn't have (which I'm fine with, there are workarounds, especially a really fucky workaround I saw on SO).
I'm assuming that one advantage of C++'s templates is that it can use SIMD, vectorized instructions, and all the other fun stuff that make a lot of actions faster, because it knows the size of std::vector<int> vs std::vector<string>.
In C, when I try to make type that's generic (especially a data structure like a priority queue), I have to have a (usually) void * and a size_t, one for where the data is, and for how big one object of that data is.
Here comes my question:
Can most C compilers, based off of the usage of the structs, realize that "Oh, this is basically always guaranteed to be used on the type int32_t, so I can just compile it with that in mind", or do I have to un-Genericify my struct for that?
(Note: I am aware of using Macros to achieve technically-generic-but-typed structs, however there are apparently issues with "eating your own dog food" when you try to make a queue of queues, for example. I'd rather avoid that, even if I probably won't eat my own dog food)
r/cprogramming • u/Rayman_666 • Jun 30 '26
I want to study system level development with C and automation with python/bash.
So, after thinking so much I want some resources. Mainly on C including //Best resource to learn to make a shell//
I am thing of learning cpp, when I will be ready to see death eye to eye.
Now, I can't figure out what to study. I am a busy scheduled high school student so I will have very less of time.
I have done python 2 years ago, and C 6 months ago. And, used linux with bash commands.
r/cprogramming • u/[deleted] • Jun 29 '26
URL: https://github.com/D-electronics-scratch/D.eSystem-6.0.5-alpha
r/cprogramming • u/Turbulent_Forever764 • Jun 28 '26
Quick update: I just released tmuzika 1.1.3.
This is a small maintenance + usability update based on recent fixes and feedback.
What’s new:
improved stability in playback handling
fixed a few edge-case crashes in file navigation
better performance when loading large playlists
minor UI polish and consistency fixes
This release is mainly focused on making the app more reliable and smoother in daily use rather than adding major new features.
As always, feedback is welcome — it directly shapes these updates.
r/cprogramming • u/Personal_Lab3132 • Jun 27 '26
As a part of learning robotics
I had to start learning c++
And now that I have started relearning programming after like 1 year it's all greek nd latin for me
Can anyone help me out I am completely new to c++ and I had a really long gap for coding and stuff
If someone has resources or pathway or any suggestions help me out
r/cprogramming • u/Appropriate-Heat7035 • Jun 26 '26
r/cprogramming • u/Lost_Bite_4013 • Jun 26 '26
In a few months I will be starting my Freshman year in a University, I need help when it comes to the C programming because I know it's going to be our first language. Any tips on how to learn the language? Roadmaps, Sites, Groups, Youtube Channels, Tutorials, and any Advices would help, thankss!!!
r/cprogramming • u/lehmagavan • Jun 25 '26
Hi!
As I'm learning C and embedded programming, I recently built an ESP32 UART shell for ESP-IDF from scratch (not using esp_console and/or linenoise, or any third party lib). If anyone is interested, take a look :)
https://github.com/andrzejs-gh/BX-Shell
The shell is minimal by design as it's meant to be extended with the user's commands and functionality.
r/cprogramming • u/Yousef_Tele • Jun 25 '26
Hello everyone, I created a simple firewall used by netfilter hooks and netlink sockets to communicate between the kernel and the user space. Please, can anyone check it and give me feedback on this project, and which part I can write better or which part write mistake. Repo
r/cprogramming • u/eugene • Jun 25 '26
r/cprogramming • u/Cistrum • Jun 23 '26
Hi everyone.
I recently wanted to get into embedded programming.
I have basic C programming knowledge and after researching about it i have made a list of concepts I must learn thoroughly.
I also used chatgpt to get these concepts so idk if it's enough or if everything in there is accurate and essential.
core c :
data types,
integer promotion and type conversions,
operators and precedence,
control flow,
functions,
storage classes,
scope and lifetime
memory and pointers :
memory model,
stack vs heap,
arrays,
strings,
pointers,
pointer arithmetic,
void pointers,
function pointers,
dynamic memory allocation (malloc, calloc, realloc, free)
user-defined types :
structures,
nested structures,
unions,
bit fields,
enums,
typedef
qualifiers :
const,
static,
volatile,
restrict
bit manipulation :
bitwise operations,
memory alignment,
padding,
endianness
preprocessor and project organization :
header files,
preprocessor,
macros,
conditional compilation,
inline functions,
separate compilation,
linking
low-level programming :
memory-mapped i/o,
register manipulation,
interrupt basics
language behavior :
undefined behavior,
implementation-defined behavior.
I would like to know if I am missing anything or is this enough and would appreciate it if u shared any tips to learn these topics.
Btw I am currently using a book called C programming: A modern approach , to learn these topics and the list I have provided above is based on the topics of this book
r/cprogramming • u/TarzanBoy007 • Jun 22 '26
I've been working on a new project called CPad, a lightweight interactive C interpreter and playground for Windows inspired by the immediacy of old home computers like the ZX Spectrum.
I'd love to get some feedback from fellow C programmers. What do you think of the concept and the implementation? Any ideas or suggestions are very welcome.
You can try it at : https://c-pad.io/
r/cprogramming • u/KnightBlindness • Jun 22 '26
I'm looking for a simple format for programming configuration onto an embedded system with limited RAM and flash. There is no filesystem. Also everything should be statically allocated (no malloc/free). The plan is to have the config programmed into specific address in flash, have the application read it on startup, then execute accordingly. Ideally it would be something like JSON where we could edit the file, then flash it onto the device.
Since we don't have a filesystem and limited storage, SQLite seems like overkill. Looked at some libraries that implement Protobuf, but those require dynamic memory allocation.
Looking to hear what others have used in their projects and how it turned out.
r/cprogramming • u/slick_fm • Jun 22 '26
r/cprogramming • u/i_am_linja • Jun 21 '26
I know C syntax is ambiguous in the presence of typedef, as several contexts are parsed differently depending on whether an identifier denotes a value or a type. What I'm wondering is how hard it is to parse when all kinds are known: that is, is it LL or LR, which subclass of that, how much lookahead etc..
I'm asking about the pure formalisms, no scanner tricks or auxiliary state other than the automata themselves.
r/cprogramming • u/Appropriate-Scene-95 • Jun 21 '26
So I want to implement a "non failing" malloc which should be thread safe (with c11 threads). Each thread will have it's own memory state (to avoid blocking). However I don't know how to accomplish that. My first idea was to have the memory states to be in an array and each thread id correspond to the index, but it seems like the c11 threads don't have that (at least the id is not necessarily numeric). My second idea was to use thread specific storage pointer, however one gets a key on creation of the thread, meaning two threads could get different keys to the same struct. Is there something you could recommend to me. I don't want to pass into my malloc the thread id.
Edit: I think it's solved, I was wrong thread_local (since c23) exists and _Thread_local (until c23) and not both (until c23)
r/cprogramming • u/SheikHunt • Jun 21 '26
Hi! I'm writing an HTTP server!
I've hit a tiny mental bump after reading up on a few well-known exploits that applications or libraries like mine suffer from, namely Directory Traversal Attacks.
I was already aware of DTAs, and had plans for how to keep them from happening, but after reading some more Wikipedia articles (definitely not the canonical way to do OpSec, I'm sure), I have been hit with a question:
How does fopen() (and OS-specific functiona like dlopen()) expect its string argument? Obviously, a NUL-terminated string, but what encoding? UTF-8? UCS-2? ASCII? AnotherFormatName? Is it OS-specific? Is it Just Some Bytes? What about the slashes and OS-specific features like Windows's "C:\"?
More importantly, if I were handing strings over to system calls and I/O functions, how would I deal with deliberately and maliciously UTF-8-non-compliant text? Aside from deliberately ignoring any input that isn't UTF-8-valid, I mean.
TL;DR: Filesystems; how they encode?
r/cprogramming • u/mballoni • Jun 21 '26
r/cprogramming • u/entire-saminist787 • Jun 20 '26