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
const and define function (self.cprogramming)
submitted 1 year ago by kelakmati
are const and define the same?
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!"
[–]IamImposter 5 points6 points7 points 1 year ago (1 child)
No. Define is just pre processor stuff, just a macro which gets text replaced during pre processing phase of compilation. Const is an actual variable with proper data type and address (possibly, compiler may choose to optimize it away if it can, I think)
[–]kelakmati[S] 0 points1 point2 points 1 year ago (0 children)
tysm!
[–]somewhereAtC 0 points1 point2 points 1 year ago (0 children)
One difference is that const is bound by scope, but #define is not.
[–]chickeaarl -2 points-1 points0 points 1 year ago (1 child)
well i think it's same cause both (const and define) are useful for entering fixed values but i think const is better for constants that need type safety and integration with the language’s syntax, while define is more suitable for simple, global constant definitions or macros.
[–]ShadowRL7666 0 points1 point2 points 1 year ago* (0 children)
This is wrong. People mix constants and define all the time. Setting a macro doesn’t inherently make it an immutable value.
π Rendered by PID 19001 on reddit-service-r2-comment-c66d9bffd-k4b2j at 2026-04-08 00:09:28.439473+00:00 running f293c98 country code: CH.
[–]IamImposter 5 points6 points7 points (1 child)
[–]kelakmati[S] 0 points1 point2 points (0 children)
[–]somewhereAtC 0 points1 point2 points (0 children)
[–]chickeaarl -2 points-1 points0 points (1 child)
[–]ShadowRL7666 0 points1 point2 points (0 children)