Which is the best book to start off with C programming language, I am learning from C-Programming-a-Modern-Approach-2nd-Edition-K-N-King? Any suggestions about this book?
try the c programming by dietel and dietel
I don't know if this is your first language, so the approaches may be different. This is what I can suggest: Volume I. The syntax and basic logic 1. First, learn to run the program both by IDE (like windows studio or xcode) and by terminal (I prefer this, and it will help more). 2. Then copy and paste one hello world program, and focus on understanding the syntax (the studio.h, the main function, etc). Here's a good, explained example http://c.learncodethehardway.org/book/ex3.html 3. Now check the types of variables: int, bool, float, double, etc. http://www.tutorialspoint.com/cprogramming/c_data_types.htm 4. Now work around some printing. Learn C the hard way has a lot of this. 5. Check the operators (%, ++, ==, &&). This is a good moment to google truth tables for and, or and not. 6. Learn to use if-else if- else statements. Then learn to do loops with while. Make a fizz buzz program. http://en.wikipedia.org/wiki/Fizz_buzz 7. Learn how to use for and build a simple game, you already know anything you need. 8. Learn how to use functions. You can also learn switch. Upgrade your game. 9. Use your knowledge until this point to do Project Euler first 2 problems. You can do more, but try smaller numbers. https://projecteuler.net/ 10. Read more about scope. It is important to understand everything. http://www.tutorialspoint.com/cprogramming/c_scope_rules.htm 11. Start working on arrays. Try to combine your knowledge in fors with arrays. Arrays can't grow, don't try that. Then go and learn about strings in C, you'll see that they are the same. 12. Understand pointers. People are scared of them, but they are simpler than you think. There are a lot of resources out there, keep simple. 13. This is a good time to try a calculator. Learn to use the math library. Use different functions, and use pointers to keep the same variable (no parameters for the functions). 14. My suggestion here is to work more on logic. Search problems out there. Learn to sort an array (Start with Bubblesort). Learn about recursion, and search for best c practices. 15. To end with simple C, learn to open, read, and write in files. A famous book you can use is The C Programming Language by Kerninghan and Ritchie, but dietel one is better for starters. If you end this, and you don't know what to do, a good way to continue is C++ (both are really similar. C++ is the son (daughter?) of C). With c++, learn to use templates and rebuild the calculator for any data type. Then go to object oriented programming and learn how to create a class, set methods, and attributes. Then learn about private and public methods, and then hierarchy. Then learn about virtual methods, methods overloading, and operator overloading (one of the hardest things for starters). Read about polymorphism. With all this ,you should be able to build much more complex things. If you prefer to keep with C, you can search for more libraries or learn about testing. Some small things you can do to learn: * Learn methods for square roots, like babylonian method. * Work with arrays of arrays, and do math with them! * Build functions to find min-max numbers of the different data types. * Do an optimised prime function * Create a Caesar Cypher. * Build a cool project * Have fun! And remember: Keep up the motivation :)
go with the OGs http://data.a5.tf/Books/Programming/C/The%20C%20Programming%20Language%20-%202nd%20edition.pdf
Join our real-time social learning platform and learn together with your friends!