Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are C versions backwards compatible?

I'm a beginner in C and I was wondering if C versions are backwards compatible so I know if I watch the correct type of tutorials.

like image 406
gagilein Avatar asked Jul 07 '26 03:07

gagilein


1 Answers

backwards compatible? mostly no
forwards compatible? mostly yes

What I mean is

When the C workgroup (WG14) publishes a new standard, most of the programs that were compatible with the previous standard are also compatible with the new standard.

However, new programs written according to the new standard do not necessarily comply with the older standard(s).

In other words... you can (mostly) write C89 and compile with any compiler (C89, C94, C99, C11, C17, C2x); however if you write C17 it may have features that are not available in C11 or previous.

like image 174
pmg Avatar answered Jul 10 '26 01:07

pmg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!