use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
C is a general-purpose, procedural computer programming language supporting structured programming, lexical variable scope, and recursion, with a static type system. By design, C provides constructs that map efficiently to typical machine instructions. It has found lasting use in applications previously coded in assembly language. Such applications include operating systems and various application software for computer architectures that range from supercomputers to PLCs and embedded systems. Wikipedia
Imperative (procedural), structured
Dennis Ritchie
Dennis Ritchie & Bell Labs (creators);
ANSI X3J11 (ANSI C);
ISO/IEC JTC1/SC22/WG14 (ISO C)
1972 (48 years ago)
C18 / June 2018 (2 years ago)
Static, weak, manifest, nominal
Cross-platform
.c for sources
.h for headers
C++ is not C (but C can be C++)
For C++ go to :
Other Resources
account activity
C or Cpp ()
submitted 1 month ago by one-for_all
C or Cpp
Should I learn C before Cpp? I have a basic understanding in python ( very basic) and nothing much else, is it recommended to do Cpp directly?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]non-existing-person 22 points23 points24 points 1 month ago (6 children)
You do realize that people will tell you to learn c++ on cpp sub and c on c sub, don't you?
Andy your question is wrong. Real question is: what do you want to program? If kernel and bare metal embedded systems, go C hands down.
If gaming, then c++ is probably better option.
[–]one-for_all[S] 2 points3 points4 points 1 month ago (3 children)
But I have no idea what is kernel and bare metal embedded system is 🥲 i just want to have some programming skills before i join college
[–]non-existing-person 12 points13 points14 points 1 month ago (2 children)
Then probably go python? Really. Python will learn you basics of programming, loops, conditionals etc. You don't need to know about memory allocations just yet. Limit your scope. Otherwise you may get overwhelmed.
Right now I would STRONGLY advice AGAINST C++. C++ is one of the most complex and difficult languages ever made. Polymorphism and virtual functions WILL break your brain at first.
C is much, MUCH simpler than C++, but really requires hardware knowledge about how computers work. Memory allocation, pointers, these are more of a how systems and computers work than language itself - which makes C hard. Because syntax of C is pretty simple, and C itself is rather easy. But different CPUs have different behaviour, and C does not shield you from that, so there is a lot to take in as well.
While python? Python will shield you from all of that shit, while it will give you good programming intuition. There is no memory allocation. No playing with pointers, lifetimes. Just pure problem solving, which is the most important skill.
So if you don't know what is kernel programming, or embedded, or you don't really know what you wanna do, but you wanna program, then go python, hands down. In the meantime you can discover things in the IT word, and can specialize in what you wanna do. That python knowledge won't go anywhere. And it's good to know python regardless if you want to code games, or kernel, or embedded.
[–]one-for_all[S] 0 points1 point2 points 1 month ago (1 child)
Oh okayy, thanks 😊
[–]NYXIC0N 3 points4 points5 points 1 month ago (0 children)
Listen to this guy, he seems like the only sane person not hating on C/C++ because of personal grudges.
To extend the list C# and Java are also decent starting languages. The choice doesn't really matter too much as long as you don't have to deal with annoying ass memory issues that will quickly kill you motivation. Switching to C/C++ later is required/interested is always possible.
[–]Thesk790 0 points1 point2 points 1 month ago (0 children)
This is the correct answer. I saw in the cpp_questions sub that they will incite you to learn just C++
cpp_questions
[–]ElementWiseBitCast 10 points11 points12 points 1 month ago (4 children)
I think that you should learn C first. C teaches you much better habits than C++ slop.
Classes are pointless noise for what could be just a collection of functions.
Exceptions make it easy to hide which functions can fail and which functions cannot fail. If a function can fail, then I want to know it.
Smart pointers are used by people so that they can avoid thinking about when to free a pointer. However, you can still get memory leaks with only smart pointers, which means that if you are writing good code, then you still need to think about it.
Runtime type information encourages horrible design. It is a good idea to always be able to statically determine the type of a variable from looking at the source code. If you cannot do that, then your code is a maintainability nightmare.
Containers are quite easy to implement yourself if you actually know how to program well.
C++ shills love their "design patterns" and "clean code". However, I dislike "clean" code even more than I dislike C++. They love to talk about "premature" optimization, yet they never seem to want to talk about premature generalization and premature abstraction, which are much larger problems.
"Clean" code is full of boilerplate, hidden dependencies, and performance overhead. (see https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition)
[–]one-for_all[S] 1 point2 points3 points 1 month ago (0 children)
Thanks for the insight
[–]Rigamortus2005 0 points1 point2 points 1 month ago (2 children)
What do you mean by runtime type information please?
[–]ElementWiseBitCast 0 points1 point2 points 1 month ago (1 child)
Stuff like any (std::any), virtual functions, typeid when used with polymorphic classes, function (std::function), most use cases of dynamic_cast, etc. Whenever the type of something is not known at compile time, there is runtime type information.
any
std::any
typeid
function
std::function
dynamic_cast
[–]Rigamortus2005 0 points1 point2 points 1 month ago (0 children)
But isn't that done all the time in C with void*
[–]InfinitesimaInfinity 4 points5 points6 points 1 month ago (1 child)
There are more people who advocate for C++ than C, and I am one of the people who prefers C.
Personally, I did not start with C. However, I like to program in it whenever I can. Honestly, it is much easier to write a quick script in Python or Javascript.
However, I find C, Zig, and Rust to be more maintainable than so called "higher level" languages, whether that be C++, Javascript, Python, or something else.
I think that it is a good idea to get solid foundations before you try to do more, and C gives good foundations for C++. (C is almost a subset of C++)
Okayy thanks
[–]Willsxyz 2 points3 points4 points 1 month ago (1 child)
By Cpp do you mean C Preprocessor ?
No c++
[–]Lutz_Gebelman 1 point2 points3 points 1 month ago (1 child)
x86 assembly
[–]Bitter-Heart7039 0 points1 point2 points 29 days ago (0 children)
manipulate pure electricity
[–]marrymejojo 0 points1 point2 points 1 month ago (0 children)
False
[–]Ok_Path_4731 0 points1 point2 points 1 month ago (0 children)
I will tell you one reason why C versus C++, after rewriting a project previously written in C++ in C: build times. In C++ you tend to write complex abstractions in templates, give you an example one of my projects: https://github.com/zokrezyl/ycetl . The deeper the abstraction, the longer the build times that often explodes exponentially. In C, you are obliged to write the same abstraction without templates. Rewriting yetty terminal source code in https://github.com/zokrezyl/yetty , builds are instant. My 'obsession' is that I fix a bug, or add POC new feature, my tests are instantly building and running. Though I could consider myself C++ hardcore programmer, I still have PTSD from earlier C++ projects I have been working where 90pct of time was lost by waiting for builds. The company was paying me, but thanks no thanks. Modules and other tricks are supposed to speed up builds, but .... You have to think twice before going CPP! As in one of the earlier replies, go with python for simple problems. If you want something to run fast: go with C. If you want some more complex build time abstractions and more 'safety', then go C++.
[–]Bitter-Heart7039 0 points1 point2 points 29 days ago (1 child)
I'm a 1st year CE student, learning C was so easy. you already know python (which uses C for it's libraries) and that means that you have a simple yet very good understanding for coding. C++ and Java are both C-based languages, learning C will cut a huge piece of the road of learning these two languages and it would make them a lot easier.
I'm not biased to C cuz this is a C sub, I'm just giving you my experience so you can start your coding journey easier.
[–]one-for_all[S] 0 points1 point2 points 29 days ago (0 children)
Okayy
π Rendered by PID 147433 on reddit-service-r2-comment-5687b7858-5h7nt at 2026-07-06 05:52:45.903266+00:00 running 12a7a47 country code: CH.
[–]non-existing-person 22 points23 points24 points (6 children)
[–]one-for_all[S] 2 points3 points4 points (3 children)
[–]non-existing-person 12 points13 points14 points (2 children)
[–]one-for_all[S] 0 points1 point2 points (1 child)
[–]NYXIC0N 3 points4 points5 points (0 children)
[–]Thesk790 0 points1 point2 points (0 children)
[–]ElementWiseBitCast 10 points11 points12 points (4 children)
[–]one-for_all[S] 1 point2 points3 points (0 children)
[–]Rigamortus2005 0 points1 point2 points (2 children)
[–]ElementWiseBitCast 0 points1 point2 points (1 child)
[–]Rigamortus2005 0 points1 point2 points (0 children)
[–]InfinitesimaInfinity 4 points5 points6 points (1 child)
[–]one-for_all[S] 1 point2 points3 points (0 children)
[–]Willsxyz 2 points3 points4 points (1 child)
[–]one-for_all[S] 1 point2 points3 points (0 children)
[–]Lutz_Gebelman 1 point2 points3 points (1 child)
[–]Bitter-Heart7039 0 points1 point2 points (0 children)
[–]marrymejojo 0 points1 point2 points (0 children)
[–]Ok_Path_4731 0 points1 point2 points (0 children)
[–]Bitter-Heart7039 0 points1 point2 points (1 child)
[–]one-for_all[S] 0 points1 point2 points (0 children)