+ 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.

31st Oct 2020, 2:57 PM
Abdur Rahman
Abdur Rahman - avatar
14 Réponses
+ 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.
31st Oct 2020, 3:00 PM
Arsenic
Arsenic - avatar
+ 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
31st Oct 2020, 5:23 PM
MVC
MVC - avatar
+ 4
Well ,Maxwell Anderson thanks for mentioning the point. Basically I did not mean to convey in that sense.
1st Nov 2020, 3:23 AM
MVC
MVC - avatar
+ 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.
31st Oct 2020, 4:30 PM
Maxwell Anderson
Maxwell Anderson - avatar
+ 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.
31st Oct 2020, 7:49 PM
Maxwell Anderson
Maxwell Anderson - avatar
+ 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.
31st Oct 2020, 3:11 PM
MVC
MVC - avatar
+ 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++.
1st Nov 2020, 3:30 PM
Donato Paul Thayalan
Donato Paul Thayalan - avatar
+ 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.
2nd Nov 2020, 11:59 AM
Udi Finkelstein
Udi Finkelstein - avatar
+ 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.
2nd Nov 2020, 12:00 PM
Udi Finkelstein
Udi Finkelstein - avatar
+ 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.
2nd Nov 2020, 12:02 PM
Udi Finkelstein
Udi Finkelstein - avatar
+ 1
c++
2nd Nov 2020, 1:07 PM
Fanuel Sileshi
+ 1
C
2nd Nov 2020, 2:56 PM
Chandravanshi Aryan Ranjan Singh
Chandravanshi Aryan Ranjan Singh - avatar
0
HTML
2nd Nov 2020, 12:01 PM
Virendra Kumar
Virendra Kumar - avatar