0
Can I still learn C through a C++ book or are those complete different languages?
6 Respuestas
+ 4
HoaiNam
Learning C through a C++ book is generally considered to be a good approach.and
C++ is an extension of the C language, so many of the basic concepts and syntax of C are also used in C++. Therefore, it is possible to learn C through a C++ book.
However, if your goal is to learn C specifically, I would recommend using a book that is specifically focused on the C language rather than a C++ book.This will ensure that you are learning the fundamental concepts and syntax of the C language, without being distracted by the additional features and complexities of C++.
Additionally....
keep in mind that there are some differences between the two languages, so it's important to be aware of those differences and to make sure that you're practicing with C-specific code in order to truly master the language.
+ 3
I would NOT recommend doing that. Even though they are basically related, it is best to treat them as completely different languages.
Emphasizing their similarity would only hinder you later on when you mix up the best practices required for writing code for each of them.
+ 2
Tนktนk💕
"Learning C through a C++ book is generally considered...."
Strong disagree. I would say that there are some similarities between the two languages, but they are at large completely different languages. Different use cases, different good practise, different ways to allocate and handle memory, completely different libraries, etc. I think most people would agree that learning C from a C++ book isn't viable. Most C++ books don't have any reason to talk about C specific stuff like malloc and related functions, extern, C-strings, etc. and doing so would only waste time or be confusing.
While yes, C code works in a C++ compiler, but there is techincally no reason for it to. You would mostly use them is completely different ways. I completely agree with @Bob_Li, using C practises in C++ is a problem many people face and that usually comes from the general myth that "C++ is just C, with classes".
+ 2
XXX
agree with you..but as I said that if her goal is to learn C specifically, I would recommend using a book that is specifically focused on the C language rather than a C++ book.This will ensure that you are learning the fundamental concepts and syntax of the C language, without being distracted by the additional features and complexities of C++.
+ 2
Khushi Soni Your answer has nothing to do with the question. Pls always stay in the topic.
+ 1
Yes you can learn C from the book of C++, but you need to give atleast 3-4 days after completing C++ to C, so that you can learn the C-format and limitations