What is the difference between c and c++

Asked

Viewed 7,835 times

-1

I am starting in programming and would like to know the difference between c and c++ and which should I start to facilitate studies.

  • 4

    If it’s not duplicated, then it’s based on opinion, because you want personal advice.

  • C has no class :P hehe.

2 answers

4

You are asking two questions here. Basically your questions are:

  • What is the difference between C and C++?

  • Why (between C and C++) to begin studies?

About the first question, they are two different programming languages, but it is important to note that C++ consists of the C language with a lot of additives made by other people. It is very difficult to find a C program that is not valid in C++, but it is easy to find a C++ program that is not valid in C.

Note that this does not mean that C is something obsolete that can be replaced by C++. See more about this in this question.

Finally, on your second question, this is totally opinionated (which is not good according to the format of this site). Some people will tell you that it is better to start with C and some people will tell you that it is better to start with C++. But remember that since almost all valid programs in C are also valid in C++, and since both languages are supercompleted, then this side would be worth starting with C. On the other hand, One might say that you will not learn object-oriented programming at first, and therefore C++ would be better. There are also a lot more reasons to argue for both sides.

1

Both are programming languages and usually used to create games as well as common systems, differences:

C is a structural language

C++ is an object-oriented language

I would recommend starting with C, since it is easier and simpler for those who are starting with programming.

Good studies!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.