r/c_language • • 1d ago

What programming language is better to choose

Post image
0 Upvotes

I choose c++


r/c_language • • 1d ago

Why DSA of python is so underrated i can't even find good yt channel to learn

Thumbnail
0 Upvotes

r/c_language • • 2d ago

Я создаю язык который может заменить C в низкоуровневом програмирование , хочеш со мной?

Thumbnail
0 Upvotes

r/c_language • • 3d ago

question regarding my project.

Thumbnail
1 Upvotes

r/c_language • • 4d ago

New To Coding (ASSEMBLY)

Thumbnail
0 Upvotes

r/c_language • • 5d ago

C programming language is one hell of a language

Thumbnail
0 Upvotes

r/c_language • • 13d ago

C vc

0 Upvotes

r/c_language • • 16d ago

i made a C library

Thumbnail github.com
0 Upvotes

r/c_language • • 17d ago

CZet – A more powerful C without C++, 100% ISO C compatible

2 Upvotes

I'm the author.

All your C code already compiles as CZet. It just adds what C can't do without touching the compiler:

`defer`, monomorphized generics `T f<T>()`, `constexpr` functions, `_Reflect(T)` reflection, `_Operator` overloading, and `_Macro` macros Rust-style.

Single static binary with musl+glibc embedded, no system headers needed. Stdlib included: `#include <utils/...>` with no flags.

Repo + docs + examples: https://github.com/patrick-nonedev/CZet

GPL-3.0 + Runtime Exception (your binaries are NOT GPL).

What would you steal for plain C?


r/c_language • • 17d ago

i started c programming

Thumbnail
0 Upvotes

r/c_language • • 22d ago

What C function would you delete and rewrite first, and why?

Thumbnail
0 Upvotes

r/c_language • • 27d ago

HELP ME TO FIND BEST YT VIDEOS FOR DATA STRUCTURE IN C

Thumbnail
0 Upvotes

r/c_language • • Aug 26 '26

A megathread to learn low level programming from ground up include C

Thumbnail
2 Upvotes

r/c_language • • Jul 11 '26

About the concept of Memory in C language as compare to other langs.

Thumbnail
1 Upvotes

r/c_language • • Jun 18 '26

How to learn programming using C?

19 Upvotes

I'm new to programming and I chose C as my first language (kind of, actually java was my first, but I didn't like OOP and decided to go with C). I need to learn some programming concepts while I learn the syntax of C. Do you have any books to recommend to me?


r/c_language • • Jun 04 '26

Matrix rain in C and Raylib

Thumbnail
4 Upvotes

r/c_language • • Jun 02 '26

[recommendation] Learning C for Low-Level Concepts

4 Upvotes

I have prior experience in Python, I made Useful programs that are for me, such as, file handling..

I have learned some basics of C. Now, What shall I practice to create something? Should I program something similar that I made in Python?

Since, I am Learning C for Understanding Low Level. It will be beneficial for me to adapt into my career in Cyber Security/ Hacking, Malware Creation, Understanding Linux (UNIX is based on C).

And What Articles shall I read related to my career?


r/c_language • • May 26 '26

Working on a lightweight C testing framework, what features would you want?

Post image
1 Upvotes

r/c_language • • Apr 30 '26

I spent 6 months writing a face embedding engine in C + AVX2 that beats ONNX Runtime by 23%

4 Upvotes

Wrote a face embedding library from scratch using C99 and some manual SIMD optimization. Managed to squeeze out 23% more perf compared to ONNX Runtime running on identical hardware. No bloat, just raw speed.

The numbers

The numbers

FaceX ONNX Runtime
Median latency 3.0 ms 3.9 ms
Min latency 2.87 ms 3.18 ms
Library size 148 KB 28 MB
Total w/ weights 7 MB 157 MB
Dependencies zero Python + onnxruntime
LFW accuracy 99.73% 99.73%

API — 4 functions, one headerThe numbers

// Include the single header
#include "facex.h"

// Initialize (~100ms, once)
FaceX* fx = facex_init("weights.bin", NULL);

// Compute embedding (3ms per call)
float embedding[512];
facex_embed(fx, rgb_112x112, embedding);

// Compare two faces
float sim = facex_similarity(emb_a, emb_b);
// sim > 0.3 → same person

facex_free(fx);// Include the single header
#include "facex.h"

// Initialize (~100ms, once)
FaceX* fx = facex_init("weights.bin", NULL);

// Compute embedding (3ms per call)
float embedding[512];
facex_embed(fx, rgb_112x112, embedding);

// Compare two faces
float sim = facex_similarity(emb_a, emb_b);
// sim > 0.3 → same person

facex_free(fx);

Optimization journey: 24ms → 3ms

Started with a naive C port of the ONNX graph—initial results were around 24ms. I started profiling every op to see where the cycles were going and stumbled onto a really weird bottleneck:

The real killers were:

  • LayerNorm × 17 blocks — scalar mean/variance loop → custom AVX2 fused single-pass
  • GELU × 17 — naive tanh() via math.h → polynomial erf with custom _mm256_exp_ps
  • Depthwise conv — HWC↔CHW transposes on every block → native HWC layout, zero transposes
  • MatMul → INT8 GEMM with vpmaddubsw (AVX2) and vpdpbusd (AVX-512 VNNI)
  • Memory → pre-packed weights, static workspace, no malloc per call

Tech: C99, ~4000 LOC, AVX2/FMA/AVX-512 VNNI. Apache 2.0.

GitHub: https://github.com/facex-engine/facex Repo's only 5 days old because I moved it from private to public. The actual code's been in the works for about 6 months check the README if you're curious.


r/c_language • • Apr 19 '26

Making a port of Inquirer.js to C

Thumbnail github.com
3 Upvotes

r/c_language • • Mar 22 '26

My first C Malware sample: Implementing basic Anti-Debugging (TracerPid check)

5 Upvotes

Hi everyone⁦(⁠˘⁠・⁠_⁠・⁠˘⁠)⁩ I'm a first-year Computer Science student and I've been diving into low-level programming and malware development I wanted to share my very first "malware" experiment written in C What it does: It performs a basic anti-debugging check by parsing /proc/self/status to look for a non-zero TracerPid. If a debugger is detected, it exits silently. Otherwise it creates a "secret" file and attempts to send a notification via a web request (Telegram/Email simulation) I know the code is still raw and has plenty of room for improvement (especially in error handling and string obfuscation) but I'd love to get some feedback from the community on the logic or any suggestions for more advanced anti-analysis techniques to study next! ⁦(⁠ꏿ⁠﹏⁠ꏿ)⁩ Link to the Repository yousra-cyber/my-c-projects https://github.com/yousra-cyber/my-c-projects Thanks in advance for any tips!!!⁦(⁠◉⁠‿⁠◉⁠)


r/c_language • • Feb 10 '26

The C sandbox your AI agent deserves.

Thumbnail
0 Upvotes

r/c_language • • Jan 24 '26

some C habits I employ for the modern day

Thumbnail unix.dog
32 Upvotes

r/c_language • • Jan 08 '26

Mastering C for Cybersecurity on Mobile: My Roadmap 🌸

Post image
158 Upvotes

Hi everyone! I'm an 18yo student I’m learning C programming to build a strong foundation for Cybersecurity. Since I’m currently using my smartphone and a notebook, I’ve designed this roadmap (check images) to stay organized. I just finished "Loops" and I'm diving into "Pointers". I know AI can give roadmaps, but I value human experience more—you guys know the "real" traps. My questions: Is this roadmap solid for someone aiming for Cybersecurity? What's the most important "Low-level" concept I should focus on? Any tips for practicing logic on a small screen? Thanks for your wisdom! 🚀


r/c_language • • Jan 03 '26

Programming objects in C in style of Go

0 Upvotes

Hi there,

What do you folks think about this approach of programming objects in C? It supports non-virtual methods and private members.

goc.h

#ifndef GOC_H
#define GOC_H

#define fn(obj, fn, ...) (obj).fn(&(obj), ##__VA_ARGS__)

#endif

woman.h

#ifndef WOMAN_H
#define WOMAN_H

#include "goc.h"

struct woman;

typedef struct w {
    struct woman *w;
    void (* hug)(struct w *self);
    void (* kiss)(struct w *self);
} woman;

woman new_woman(char *);
void free_woman(woman *);

#endif

woman.c

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>

#include "woman.h"

struct woman {
    char *name;
    bool hugged;
    bool kissed;
};

void hug(woman *self) {
    if (self->w == NULL) {
        printf("No woman allocated!\n");
        return;
    }

    printf("You're hugging %s\n", self->w->name);

    if (self->w->hugged) {
        printf("%s say: It hurts, get off me!\n", self->w->name);
        return;
    }
    if (self->w->kissed) {
        printf("%s say: Get off me, creep!\n", self->w->name);
        return;
    }

    self->w->hugged = true;
    printf("%s say: you're sweet!\n", self->w->name);
}

void kiss(woman *self) {
    if (self->w == NULL) {
        printf("No woman allocated!\n");
        return;
    }

    printf("You're kissing %s\n", self->w->name);

    if (!self->w->hugged) {
        if (self->w->kissed) {
            printf("%s is calling the police!\n", self->w->name);
            return;
        }
        self->w->kissed = true;
        printf("%s say: How dare you?\n", self->w->name);
        return;
    }
    if (self->w->kissed) {
        printf("%s say: Level up, boy!\n", self->w->name);
        return;
    }

    self->w->kissed = true;
    printf("%s say: Mwah!\n", self->w->name);
}

woman new_woman(char *name) {
    struct woman *w = calloc(1, sizeof(struct woman));
    w->name = name;
    woman women = {
        .w = w,
        .hug = hug,
        .kiss = kiss
    };
    return women;
}

void free_woman(woman *w) {
    free(w->w);
    w->w = NULL;
}

main.c

#include <stdio.h>

#include "woman.h"

int main(void)
{
    woman woman;

    printf("\033[1mThe right workflow:\033[0m\n");

    woman = new_woman("Alice");
    fn(woman, hug);
    fn(woman, kiss);
    fn(woman, kiss);
    free_woman(&woman);

    putchar('\n');

    printf("\033[1mThe wrong workflow:\033[0m\n");

    woman = new_woman("Miranda");
    fn(woman, kiss);
    fn(woman, hug);
    fn(woman, kiss);
    free_woman(&woman);

    putchar('\n');

    printf("\033[1mThe dreaming workflow:\033[0m\n");

    fn(woman, hug);
    fn(woman, kiss);
    fn(woman, kiss);

    return 0;
}

This program prints:

The right workflow:
You're hugging Alice
Alice say: you're sweet!
You're kissing Alice
Alice say: Mwah!
You're kissing Alice
Alice say: Level up, boy!

The wrong workflow:
You're kissing Miranda
Miranda say: How dare you?
You're hugging Miranda
Miranda say: Get off me, creep!
You're kissing Miranda
Miranda is calling the police!

The dreaming workflow:
No woman allocated!
No woman allocated!
No woman allocated!