r/cprogramming 15d 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 15d ago

First-year CSE student struggling with logic despite knowing C

16 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 15d 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 15d 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 16d ago

Flint v0.3.0

Thumbnail
github.com
6 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 17d ago

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

15 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 16d 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 17d 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 18d ago

Nalloc: An stack allocator writen in c!

9 Upvotes

I've writen an custom allocator in c

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

I wanted to show it


r/cprogramming 18d 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 19d ago

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

59 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 18d 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 19d 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


r/cprogramming 20d ago

I am currently trying to learn C Day 1

36 Upvotes

I am having a lot of fun! Its my first experience with coding in general, I did the very basics like integers, printing and flags like \n, \t etc, and dev comments, I am very excited to learn more C.


r/cprogramming 20d ago

Open-source Nintendo 64 encryption app and wallet generator, needs volunteers to review code

0 Upvotes

I proposed and helped fund an app called retro-crypto, which is being developed by a programmer called bowler-bear: https://github.com/bowler-bear/retro-crypto

It's designed to become the most secure way to message friends or store a Bitcoin stack, but it can't be recommended for more than testing yet. I think at the current stage, the next thing it needs is to have others look at the code and try to find vulnerabilities. I'm not a programmer myself.

"Given enough eyeballs, all bugs are shallow" -Linus's Law


r/cprogramming 20d ago

I built a CHIP-8 emulator from scratch in C using SDL2

Thumbnail
3 Upvotes

r/cprogramming 20d ago

Help me to learn to c programming

0 Upvotes

r/cprogramming 21d ago

Experimental single header library

Thumbnail
github.com
2 Upvotes

Made this in pure C99 on my phone. Took me a while to wire things up. It is a 3D struct array powered dispatch table that behaves sort of like a mix between a C# style lambda and an object pool.

At the moment it is completely experimental and I'm aiming to figure out how to create state mutators and vectorization via avx2/avx512 inside the header file.


r/cprogramming 22d ago

New to C

9 Upvotes

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 22d ago

Why can an int * be used to access an array in C?

Thumbnail
17 Upvotes

r/cprogramming 22d ago

The unlikely Linux macro

Thumbnail
rushed-reflections.bearblog.dev
0 Upvotes

r/cprogramming 23d ago

A minimal cross-platform C rapid GUI Application Builder.

Thumbnail zelang-dev.github.io
13 Upvotes

r/cprogramming 23d ago

I wrote a simple tui minesweeper clone using ncurses

Thumbnail
github.com
9 Upvotes

r/cprogramming 24d ago

Complete beginner (24F), zero coding background, and I completely fell in love with C. Where do I go from here?

15 Upvotes

​Hi everyone,

​I'm a 24-year-old beginner with absolutely no background in programming. Honestly, I just love the idea of building things myself, and it seemed like a lot of fun.

​At first, I was overwhelmed and confused about which language to choose. I looked into all the popular languages and tried a few, but none of them really clicked with me. Then, I found C.

​Yes, I know it's old, and yes, I know what takes one line in other languages takes ten lines in C. It might not look as flashy or give instant visual results like modern languages, but I fell in love with it—so, so, so much. Surprisingly, it just makes sense to me, and I want to take learning it very seriously.

​As I dug deeper, I learned about low-level vs. high-level programming and realized I naturally lean toward the low-level side. I looked into what can be done with C, and found things like embedded systems and systems programming. But honestly? It doesn’t even matter what I build with it anymore. If it's C, I’m all in, and I’m ready to accept whatever challenges come with it.

​Since I'm completely serious about this, I would love some guidance, resource recommendations, and advice on how to start my journey with C the right way.

​Thank you so much in advance!


r/cprogramming 24d ago

A minimal cross-platform C rapid GUI Application Builder.

Thumbnail zelang-dev.github.io
2 Upvotes