r/cprogramming • • Oct 24 '25

What IDE do you use for C/C++?

88 Upvotes

I use Devcpp 5.11 since thats what i use in hs as a freshman, its pretty simple.


r/cprogramming • • Oct 25 '25

C actually don't have Pass-By-Reference

Thumbnail
beyondthesyntax.substack.com
0 Upvotes

r/cprogramming • • Oct 23 '25

What is the Best way To Learn C programming

7 Upvotes

Hi, i just learned some basics of c ,and i want the best way to master it beside learning Linux, and if there project or something related to that,i appreciate ur help,thank you all


r/cprogramming • • Oct 22 '25

Created DSS, a Generic Dynamic Byte Buffer for C. Seeking ideas on advanced strategies and algorithms for memory expansion.

5 Upvotes

I would like to share my recent project, dynamic byte buffer library for C, called DSS, packed with a variety of useful APIs. This project is inspired by SDS (Simple Dynamic Strings for C), but extends it with internal reference tracking and copy-on-write based APIs. Unlike conventional C string libraries, DSS allocates metadata and the string buffer in one contiguous memory block, minimizing allocation overhead and improving cache locality.

I have taken an aggressive approach to memory expansion, which has produced some interesting results in my test experiments that are discussed in detail in the benchmark section of the repository.
I have also prepared a detailed report with experiments that analyze the speed and memory usage in variety of workloads, as well as discussed potential areas for improvement.

While this approach has increased speed, it has also led to higher memory usage. You can explore the related implementation in the dss_expand function.

I’m looking to refine the memory expansion strategy and would really appreciate suggestions on alternative approaches and algorithms.
I’d prefer not to replicate SDS’s method, but rather experiment with new techniques that could yield more insightful results.

Additionally, I would love to get feedback and reviews on the project overall, particularly ideas for:

  • New APIs or features that could make DSS more powerful or flexible
  • Better memory expansion techniques/algorithms, since that’s a critical part of any dynamic buffer

Please find the REPO HERE.

Thank you!


r/cprogramming • • Oct 22 '25

Compile time constants vs run time

2 Upvotes

I’m having a hard time wrapping my head around the idea of compile time constants vs run time. I understand compile time and run time itself, pretty much compile time is where it’s running through the code and turning it into machine code (compiler and linker) and runtime is when the code is actually running on a machine. I also understand that compile time constants are going to be values that the compiler can evaluate and see without running code. When it comes to compile time constants I just don’t understand because in C, const int y =5; , y isn’t a compile time constant but wouldn’t the compiler see y?

I also understand something like the return value of foo(); would be a run time thing since you need to actually run code to get the return value.


r/cprogramming • • Oct 21 '25

I built a real-time JIT engine in pure C (60 live demos, instant execution)

Thumbnail
youtu.be
75 Upvotes

I’ve been working on a live JIT engine that compiles and runs C code instantly, no build step, no waiting.

It feels like interpreted code, but runs with native performance.

Each .jc (JIT C) file is compiled and executed in real time.


r/cprogramming • • Oct 21 '25

CConsole - an interactive shell for C testing

Thumbnail reddit.com
3 Upvotes

r/cprogramming • • Oct 22 '25

how know len the arrays in c i want more than one

0 Upvotes

r/cprogramming • • Oct 19 '25

No C application project option in NetBeans 27

1 Upvotes

I installed Apache NetBeans 27 for school assignments and homework in C language.
My teachers wanted to eat me alive after I mentioned Visual Studio, and I was told to never use any other software because Apache NetBeans is the default in the college labs.

When I downloaded it and went to make a new "C application" project i never saw the option.

I searched every website and every YT video available and never found a solution...
I have a very important assignment

please help me


r/cprogramming • • Oct 17 '25

Found the goon label

110 Upvotes

I was digging around the V2 Unix source code to see what ancient C looks like, and found this:

	/* ? */
	case 90:
		if (*p2!=8)
			error("Illegal conditional");
		goto goon;

The almighty goon label on line 32 in V2/c/nc0/c01.c. All jokes aside, this old C code is very interesting to look at. It’s the only C I have seen use the auto keyword. It’s also neat to see how variables are implicitly integers if no other type keyword is used to declare it.


r/cprogramming • • Oct 18 '25

Book

0 Upvotes

So hello I have been learning c and made an basic shell,but now I am confused about what projects to make that could help me grow , (i have also been learning computer architecture) and also I am confused about what I want to choose after c (ml,hardware)


r/cprogramming • • Oct 17 '25

Performance: return pointer vs mutate pointer argument

2 Upvotes

Is there a performance difference between

ARBITRARY_TYPE *b()
{
 return malloc(sizeof(ARBITRARY_TYPE));
}
int main(int argc, char **argv)
{
 ARBITRARY_TYPE *ptr = b();
 ARBITRARY_FUNCTION(ptr);
 return 0;
}

and

void b(ARBITRARY_TYPE **ptrptr)
{
 *ptrptr = malloc(sizeof(ARBITRARY_TYPE));
}
int main(int argc, char **argv)
{
 ARBITRARY_TYPE *ptr;
 b(&ptr);
 ARBITRARY_FUNCTION(ptr);
 return 0;
}

r/cprogramming • • Oct 16 '25

Want to learn c

0 Upvotes

As the title says, I want to learn c cuz I would love to explore, learn, get into low level system/embedded systems Edit:- forgot to write the main point, please recommend me some good resources 😭🙏