Can I still learn C through a C++ book or are those complete different languages? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Can I still learn C through a C++ book or are those complete different languages?

18th Jun 2023, 4:52 PM
HoaiNam
HoaiNam - avatar
6 ответов
+ 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.
18th Jun 2023, 5:12 PM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar
+ 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.
19th Jun 2023, 12:04 AM
Bob_Li
Bob_Li - avatar
+ 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".
20th Jun 2023, 4:40 AM
XXX
XXX - avatar
+ 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++.
20th Jun 2023, 6:01 AM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar
+ 2
Khushi Soni Your answer has nothing to do with the question. Pls always stay in the topic.
21st Jun 2023, 12:35 AM
Emerson Prado
Emerson Prado - avatar
+ 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
18th Jun 2023, 5:32 PM
Md Saif Ali
Md Saif Ali - avatar