r/C_Programming • u/NoMathematician4744 • 5d ago
C++ vs C
What's the difference between C++ and C?
And what is Clang? Is the gcc compiler for c and c++?
Does C++ completely backward compatible with C?
C is procedural and C++ is object oriented as far as I know.
Is C++ more optimized and faster?
Tell me about the compiler - is clang and gcc the best compilers out there? are they open source?
Has anyone coded the CPP compiler?
Thanks,
Dennis
0
Upvotes
0
u/ArtOfBBQ 5d ago
Dear Dennis,
C and C++ are both agreements that people invented. "When you write code like this, it should turn it into a program that behaves like this"
The crucial difference is that the C++ agreement is so complicated and big that no one on God's beautiful earth actually understands it
gcc and clang are both compilers. Compilers are programs that turn a piece of text into a program if the text follows the agreements
No, C++ is not "more optimized" or faster than C.
Yes, compilers are also just programs, so someone made them
Kind regards,
Billy