Punit Jain wrote:can you suggest me any good book for c and c++??
For C++ I would recommend "Accelerated C++" by Koenig and Moo. I can't think of a good introductory book for C, and I'm inclined to say that it's not worth learning C separately until you really need to, as good C idioms are quite different from good C++ idioms, and learning both will lead to confusion, and make your C++ worse.
I agree, don't mess around with C unless you have to. It's an old low level language that may stand in the way of your learning process at this time.
If you are trying to learn OO programming, then C is not a good choice. Go with C++.
I don't agree that C is a low level language though, but that's just me ;). I started with C in the late '80s & used it solidly for almost 20 years. Now I am pretty much just doing Java. C gives you the freedom to do pretty much what you want programmatically. You are not bound by contracts or "save me from myself" issues the compiler tries to enforce as with Java.
I still prefer C and have a coding style that mimics OO which has evolved over the years.
As for books, I can't recommend a modern publication for C, but for C++ the book by the man himself - Stroustrup, The C++ Programming Language 3rd edition (don't know if a later version has been published) is pretty good.
Hope that helps.
-- Nothing is impossible if ImPossible
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop