Question:
If you learn c ++ do you know c also?
Natedogg_ask
2007-10-01 18:27:23 UTC
I have no clue.
Five answers:
goobrruuinnzz
2007-10-01 21:26:55 UTC
C++ is a superset of C, so if you were to learn all of the C++ constructs, you would then, by definition, know C.



That said, there are several constructs in C++ that replace the C versions. Examples include dynamic memory allociation (new and delete instead of malloc and free), the handling of files (streams instead of file pointers), and the handling of strings (STL string and stream classes instead of character arrays).



Also, if you are using C++ to its fullest extents, you are using Object Oriented principals. C is, by its nature, a structured language. You can do structured C++, but to do OO C requires some really awkward abstraction.
2007-10-02 11:29:39 UTC
No.



C++ is derived from C. But C++ discourages its users from using what it brought from C for many reasons. So you will end up with no hands on in using those C features that C++ has. So you will not have learnt C by learning C++ to call yourself a serious C programmer. Only you will be able to write C code that tries to resemble the code that you would write in C++.
?
2007-10-02 01:50:54 UTC
Yeah, its a little different. Lower level But hey, you also learn a lot of Java as well . :-)

Looking at C++ and Java you would have to look twice.
WishInvestor
2007-10-02 01:31:21 UTC
Hai Natedogg_ask,



Yes. C++ includes every thing of C plus many other features. C is the base of C++.
i_am_the_next_best_one
2007-10-02 06:15:46 UTC
no c++ is extended c even though u will learn c but to implement it u will find difficulties



its a question like can a car driver, drive cycle


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...