r/cpp • • Sep 22 '21

Differences between C and C++, comedy garbage

https://www.makeuseof.com/differences-between-c-c-plus-plus/
0 Upvotes

7 comments sorted by

View all comments

8

u/Accomplished-Tax1641 Sep 23 '21

We forced a bot to watch 10,000 hours of C++. This is what it came up with.

Generally, the C programming language uses two types of values, which include immediate and variables. Four basic variable types of C are int, float, char, and double. In C++, language variables must be declared first. The primary variable types for C++ are bool, void, and wchar_t.

Unlike C, C++ is a procedural language with OOP. In addition, it's machine-independent, simple, and case-sensitive.

#includes <iostream>
using namespace std;
int main () {
    Std :: cout << “ Hello, MUO !” << end1;
return 0;
}

4

u/Accomplished-Tax1641 Sep 23 '21

I missed this part on first reading:

The C programming language operates with the top-down approach, which breaks the central unit into smaller tasks. C++ follows the bottom-down approach, which works from low level to next level.

3

u/Wriiight Sep 23 '21

The bottom-down approach does accurately describe the quality progression of most legacy code-bases though!