+ 5
Which should i learn first c or c++?
I finished my python course, now i wish learn the inner workings of a computer,a lot people suggested assembly,c or c++ would be great,the app has only c and c++,if i learn one do i need to learn the other.
14 Answers
+ 12
C and C++ are now completely independent langaues, so learning one does not require you to know anything of other at all. But the best part is that knowing one will definately help in learning other as syntax is almost same in both.
+ 4
Maxwell Anderson I just do not know why do one must learn C over C++.
As C++ is much more robust safer and have both procedural and OOP features.
"You will end up learning C++ then trip over yourself over and over again when you realize C lacks C++'s excessive number of language features and implements solutions to problems in different ways."
Thats why I recommended C++.
Yes no two languages are same.
Rather they have similarities and differences.
And these two also have.
Sharing a link
Answer to What are the similarities and differences between C and C++? by Arundhati Banerjee https://www.quora.com/What-are-the-similarities-and-differences-between-C-and-C/answer/Arundhati-Banerjee-33?ch=3&share=6380c014&srid=u3x8w8
+ 4
Well ,Maxwell Anderson thanks for mentioning the point. Basically I did not mean to convey in that sense.
+ 3
What Mukesh Chhallani says is not true at all. Learning C++ doesn't automatically mean you learn C. While C++ builds a lot upon C, C has a VERY different design pattern and paradigms.
You will end up learning C++ then trip over yourself over and over again when you realize C lacks C++'s excessive number of language features and implements solutions to problems in different ways.
+ 3
Mukesh Chhallani You incorrectly assess that excerpt from my comment. It's fine to recommend a language based on the features it provides, but I was not calling out your recommendation, I was calling out your hasty assertion that learning C++ is learning C.
+ 2
Well I think if you go for C++ , then almost automatically you arer done with C.
As C++ is like further extension to C with Oop concepts etc.
Definitely , they both goona help in each other as Arsenic said.
+ 1
I suggest learning the C++ course in SL and then C to get into roots of C++.
C course also has more info on to memory management which you can also apply on C++.
+ 1
As the original poster is interested in learning how a computer works, and not specifically C or C++ as a target by itself, I would advise against the majority of the people here and suggest C.
C++ is so much more complex than C, and the class mechanisms, esp. Virtual functions require a much more complex implementation than C's simple functions.
If you want to know how a computer works, learn a bit of C, then learn ANY assembler, the easiest the better, for example MIPS and not x86. X86 has so many instructions and bizzare modes so it is very complex.
Then go to compiler explorer ( https://godbolt.org/ ),select your language (C), select a cpu architecture such as MIPS, then write a simple function and see how it is translated to assembly.
There is more to learn such as how the linker works, what's a stack frame, what are interrupts, but you should start somewhere.
+ 1
I dare saying that 90% of those suggesting C++, either don't know it themselves, or THINK that they know it.
With C++, the more you learn it, the more you realize how little you really know.
+ 1
A totally different approach how to learn how a computer works is:
https://www.nand2tetris.org/
http://nandgame.com/ which is unrelated to, but inspired by the nand2tetris course.
+ 1
c++
+ 1
C
0
HTML