+ 4
Just how similar is C++ to C? Can every C code run in C++?
I solved the security problem in Code coach with C. That's the only language I know. I then copied my code and pasted it as a C++ entry. And it not only ran but passed all the test cases and awarded me more XP. So I want to know if C++ can run all C codes so I can just move to C++ instead.
12 Respuestas
+ 3
Most of the time, C code can be run fine on C++. But just most of the time.
Here are a few exceptions (there are more beyond the post given): https://www.geeksforgeeks.org/write-c-program-wont-compiler-c/
+ 2
Aysha Simra Yes. Thanks
+ 2
Simple answer yes. Most c programs can work on c++, they both basically run on mingw compilers
+ 1
See at the basics both the languages are almost same but where the level highers the differences between them are noticable so they aren't that same .🤗
+ 1
C++ superset of C. C++ has tons of features, but C is the simplest language I studied.
+ 1
KTM Hacker Thanks man
+ 1
Welcome
+ 1
CarrieForle I've read through it. So C++ is basically a stricter version of C that supports classes. Thanks a lot
0
Flash oh. Thanks
0
C++ is an advanced version of C
C++ is an object oriented programming language while C is procedural oriented so C++ code cannot run in C but vice versa is possible though not completely