r/cprogramming 8h ago

Is studying C from book better than watching videos for C?

3 Upvotes

I have prior knowledge about java now in college i started learning C from reading KN Kings Modern approach to C programming , but people at my college are doing it from YouTube videos what should I do ???


r/cprogramming 6h ago

Sixteen branches is all you ... get?

Thumbnail
rushed-reflections.bearblog.dev
0 Upvotes

r/cprogramming 8h ago

A project so great

0 Upvotes

Drop the best project you've made.

The one you are most proud of.


r/cprogramming 13h ago

How to learn

0 Upvotes

I just started learning C about 5–6 days ago, and I had never coded before.

I completed the CS50 course, so I know the important concepts and have a basic understanding of how things work. But when it comes to actually implementing them, I feel like I’m at zero.

Now I’ve started learning C from the book The C Programming Language. I’m understanding some concepts, but not everything. I’d say I’m only understanding around 20–25% of what I read.

For example, I understand how "getchar()" and "putchar()" work individually, but when I see a program that uses them together, I don’t even understand 60–70% of the program.

I’m getting stuck, and it’s making me think that maybe only people with good logic can survive in programming jobs.

So, please guide me on how I should approach learning C correctly and develop my programming logic.


r/cprogramming 10h ago

С-плюсеры, общий сбор

Thumbnail
0 Upvotes

r/cprogramming 1d ago

What's the difference between r/cprogramming and r/C_Programming

42 Upvotes

What's the point of having 2 subreddit for the same thing


r/cprogramming 1d ago

Resources to prepare for advanced/trickey questions?

Thumbnail
1 Upvotes

r/cprogramming 1d ago

miamore - A new tui library, no-dependency C TUI library with safe Rust bindings

0 Upvotes

Hey r/cprogramming ,

I’ve been working on miamore, a lightweight C-based terminal UI library, along with miamore, its official Rust bindings on crates.io.

I built miamore because I wanted a minimal, local-first TUI rendering library that stays completely out of the way—no heavy framework overhead, no bloat, and zero AI/ML dependencies.

Just clean, deterministic C with simple primitives for rendering frames, managing components, and styling elements directly in the terminal.Key FeaturesPure C Core: Compiles fast with a plain Makefile and linkable static/shared outputs.

Safe Rust Wrapper (miamore): Built using bindgen with clean idiomatic Rust wrappers over raw FFI, available on crates.io.

Zero Bloat: Minimal memory footprint designed for speed and low-resource environments.

Local-First & Open Source: Licensed under LGPLv3 / GPLv3.

This is a basic rust example below:

use miamore::*;

fn main() {
    // Initialize miamore terminal state
    init_miamore(true, true);

    manage_keys(keys_t::disable);
    draw_border("!Rust test!", theme_t::thick_l);

    manage_cursor(cursor_t::move_, Some(position_t { x: 5, y: 5 }));
    manage_cursor(cursor_t::show, None);

    // setting foreground color
    set_fg(colors_t::blue);
    // let ptr = give_color(colors_t::green);
    // draw_text(&ptr);

    draw_text("Hello,");
    draw_text(" World!\n");

    draw_shape(
        shape_t::rect,
        ShapeOptions {
            theme: theme_t::double_l,
            dimensions: dimensions_t {
                width: 26,
                height: 12,
            },
            position: position_t { x: 5, y: 12 },
        },
    );

    wait_for_seconds(8.0);
    clear_origin();
}

Links & Repo GitHub: https://github.com/Ametrine-cc/miamore

crates.io: cargo add miamore I'd love to hear feedback on the API design, hear about any bugs if you test it out on your terminal setup, or take PRs if you want to contribute.


r/cprogramming 1d ago

Ban ru*t?

0 Upvotes

Yes


r/cprogramming 1d ago

Starting to learn c language

0 Upvotes

Please recommend some good study material, resources and lectures to do so…


r/cprogramming 2d ago

Math library code review

5 Upvotes

I am relatively new to C so I try to improve my skills by making a math library. The biggest challenge was making generic containers for matrices and vectors, as I was kind of new to void pointer magic. I think I have polished the most glaring issues in the code but do any of you have suggestions for what I could be doing better in my approach to C? Github for reference:

https://github.com/VatoQ/hoema-prak-clang


r/cprogramming 3d ago

My open-source VS Code extension for CScout, a whole-program C analysis engine

11 Upvotes

Ive built a VS Code extension for CScout, a C analysis engine that understands identifiers correctly across the whole program even when macros are involved.

For my GSoC project this year I've been building on top of CScout, which is this old but really solid C analysis tool (its been around since the early 2000s and been run on stuff like the Linux and FreeBSD kernels). Problem was it only had a web UI, so using it means constantly switching between your editor and a browser tab just to look something up. I wnted to actually use it while coding, not alt tab to it.

So I built a VS Code extension on top of it. It gives you go to definition and find all references that actually resolve properly through macros and across files, unused identifier warnings based on whole program analysis instead of per file guessing.

It also figures out your build system on its own, be it Makefile, CMake, Meson, or Autotools, it detects which one you're using and generates what it needs in the background. If you use something else entirely, you can still point it at a compile_commands.json generated by Bear and it'll work.

Sourcetrail did something similar for C/C++ once....

Ran the extension against awk, zstd and cJSON so far and its been solid, currently working through some edge cases on curl.

Extension Repo ---> https://github.com/cscout-project/cscout-vscode

If you deal with medium sized, large or legacy C codebases and have a minute to poke around, id really appreciate any kind of feedback you have on it.


r/cprogramming 3d ago

First-year CSE student struggling with logic despite knowing C

17 Upvotes

I’m a first-year B.Tech CSE student and I’m fairly comfortable with programming syntax, especially C. I can understand and write basic programs, but I’ve realized that my main weakness is problem-solving and logic building. If someone gives me a familiar problem, I can usually code it, but if they ask me to solve the same problem in a different or more efficient way, I often struggle to figure out the approach on my own. I feel like I know the language, but I haven’t developed the “programmer mindset” yet knowing how to break a problem down, identify patterns, choose the right approach, and improve a solution. For those who have been through this stage, how did you overcome it? Do you recommend any particular books, problem sets, courses, or methods for building strong logic and problem-solving skills, preferably starting with C?


r/cprogramming 3d ago

20M Looking for Coding + Communication Partner

Thumbnail
0 Upvotes

Hey everyone! 👋

Looking for someone to practice C, Java, or Python along with English communication.

💻 Coding practice

🗣️ Communication practice

🤝 Learn and improve together

Beginners are welcome. DM me if interested


r/cprogramming 3d ago

Scanf not working!!

Thumbnail
0 Upvotes

So now its been 2-3 weeks ....in my college we are doing C programming and everything was working fine on visual studio till I started using scanf for taking input from user.....this is coming and I have tried everything but cant figure out....normal printf still works but this doesnt

I have tried on code blocks too and same problem is there.....pls someone guide me🙏🙏😭


r/cprogramming 4d ago

Flint v0.3.0

Thumbnail
github.com
4 Upvotes

Hi folks, I’m experimenting with Flint—a bare-bones, manifest-first build system and package manager for c/c++ projects.

The core idea:

Git-Native: Fetch dependencies directly via Git using `flint add <url>` or `flint sync`.

One Config: Manage your project layout, includes, and GCC/Clang calls through a single composition.json. Most of the cases you don't have to touch the composition file, flint will take care of that.

Chert compositions: Simple specs to make unmanifested third-party repos compatible out of the box.

Fair warning: It's an early prototype! It currently forces a fixed directory structure (src/, include/, deps/) and available only for Linux.

It’s definitely rough around the edges, but I’d love to get your thoughts on what can be added or improved (Also I know there are many mature alternatives available, but remember every mature solution once was a novice experiment)

Repo: github.com/mainak55512/flint


r/cprogramming 3d ago

I'm a bit of a fan of Dennis Ritchie :P

Thumbnail drive.google.com
0 Upvotes

Dennis Ritchie brought C and Unix to the world.

So one post goes into the unix subreddit,

and one post goes here :)

I guess you could say I'm impressed with the guy.


r/cprogramming 5d ago

What editor or IDE (and tools) do you use?

16 Upvotes

Just curious what editor/IDE you use to do your C programming?

I primarily use joe (Joe's Own Editor), which is not an IDE, under Linux, and use gcc as the compiler.

When I did some Windows programming in C++, I did use Visual Studio, and I have played around a bit with VS Code, but I'm very stuck on the WordStar-style key-bindings (which were the ones I got used to when using Turbo Pascal and Turbo C back in the early 1990s, and is what joe uses).


r/cprogramming 4d ago

What application should i download?

0 Upvotes

Helloo!! Information technology freshie heree! our professor in Computer Programming 1 is requiring us to download an application in our mobile phone that can both run and compile a C programming language.

Its not really my choice of program that's why i don't have any knowledge about this.

Thankyouuu!


r/cprogramming 5d ago

Easing memory management with a shared pointer

0 Upvotes

I recently developed a C (11 and newer) implementation of a thread-safe shared pointer with atomic reference counting:

https://github.com/andrzejs-gh/SHPTR

It supports both strong and weak references and a swappable destructor. Initialization performs a single allocation.

If anyones interested, take a look. Feedback and bug reports very much welcome.


r/cprogramming 6d ago

Nalloc: An stack allocator writen in c!

7 Upvotes

I've writen an custom allocator in c

https://github.com/text-games-coding/Nalloc

I wanted to show it


r/cprogramming 6d ago

Code Review : Sudoku GUI in C language

2 Upvotes

Background:

I am a beginner programmer and I wrote a Sudoku GUI in using winapi32 in C language.

It is currently working and does what it is supposed to do, but because I am still learning, I know it is likely inefficient and could be written much better.

GitHub repo link: https://github.com/reewdgh/sudoku_gui
Please guide me on:

  • Bugs
  • Efficiency
  • Naming anything I could simplify or improve
  • inconsistency

I'd appreciate your feedback on my code.


r/cprogramming 7d ago

We made a megathread to learn low level programming from ground up include C

56 Upvotes

Hey guys, I often see people on this subreddit asking how to start learning C programming or how to get into low-level programming. So, to make things easier for beginners, we put together a big megathread that works like a resource hub for learning low-level programming. It also includes resources for learning C.

Instead of searching through lots of different posts and websites, you can find everything linked together in one place.The megathread also includes other useful megathreads and resources that can help you learn more about the field you’re interested in, step by step. We also plan to add a wiki with more interactive content and guides. The wiki isn't properly set up yet, but we'll work on it in the future.

Just wanted to share this here in case anyone is interested in learning C or low-level programming. Hope it helps !

https://github.com/0xTamil/awesome-low-level


r/cprogramming 6d ago

Help me with this issue in C !

0 Upvotes

So, recently I have been trying to build my own Pac Man game in C with Railyb.

Everything was going fine until I added this magical walls. So basically I wanted 2 walls to be drawn on screen when my player reached some x, y coordinates, the walls get drawn but the collision does not happens. I am so tired, I have been trying to fix this for 2 straight days.

I would really appreciate if some body helped me.

C source file on my Github : https://github.com/saielsh/Unfinished-Pac-Man-game


r/cprogramming 7d ago

I built a dots manager using C (and Go) with a resource graph and reconciliation model

4 Upvotes

All,

I've been managing my dotfiles using Dotbot + Jsonnet for a while. As my configuration grew, it started to get overly complicated and uncomfortable to use.

I looked at some of the existing options like stow, home-manager and nix. However, I didn't really want to commit to nix - and for what it's worth nix is great.

I really like declarative config systems, and felt like it worked really well for the problem space. So, I designed a declarative config system for user environments.

Rather than the traditional models, things like:

  • files
  • packages
  • directories
  • symlinks
  • services
  • etc

All form resources, which form a dependency graph, and then the system will reconcile the graph toward the desired state.

Essentially:

This project is mostly experimental at the moment, and still evolving but it's getting closer to the point where I'm comfortable using it for my own config.

I feel like this sits somewhere in the middle of stow/dotbot & nix/home-manager.

Feedback, suggestions, improvements, contributions, etc are all welcome.

Currently the stack looks like:

C (where most of the resource graph and reconciliation happens)

  • libuv
  • libgit2
  • libarchive
  • lua54
  • jansson
  • libsodium
  • libuuid
  • xxhash

Go (mostly for the frontend user-experience):

  • jsonnet
  • bubbletea + lipgloss

GitHub: https://github.com/arcadia-de/hypha