When comparing The C Programming Language (AKA: K&R) vs W3Schools, the Slant community recommends The C Programming Language (AKA: K&R) for most people. In the question“What are the best resources for a beginner to learn C?” The C Programming Language (AKA: K&R) is ranked 2nd while W3Schools is ranked 8th. The most important reason people chose The C Programming Language (AKA: K&R) is:
This book is so well known that it's affectionately called "K & R", after the authors. It's been cited in many other books and is familiar to most, if not all, CS students.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Well known classic
This book is so well known that it's affectionately called "K & R", after the authors.
It's been cited in many other books and is familiar to most, if not all, CS students.
Pro It's excerpted from the idea of its creators
This book is written by Dennis Ritchie, who was one of the main people behind the development and design of C and UNIX.
Pro Creative, challenging exercises
The challenges at the end of each chapter do a great job of requiring many of the skills learned up to that point. Completing the challenges is a great way of insuring you understand the material.
Pro This book set the template for programming language books
Pro Easy to learn
All the tutorials are written in a straightforward and easy to understand way.
Pro Built in editor
Almost every example has a "try it yourself" button which opens up an editor in a new tab. It allows you to play with the example code and see how it works.
Pro Well organized tutorials
All of the lessons are separated into their own pages, which makes it easy to learn about specific concepts.
Pro Great source from Google search's perspective
Cons
Con Out of Date
Some commands and practices are out of date, so errata and googling is needed while going through the book.
Con Teaches bad style
The K&R style works for old Unix mainframe command-line programs that exit after a simple task and leave the cleanup to the OS; where input is only from trusted experts; and most functions are only called internally to the program. The environment is very different today. This style will get your server owned by hackers, or crash it due to a memory leak, etc. You will have to unlearn what you've learned from this book to use C correctly in the real world today.
Con Not for beginners
Assumes familiarity not only with programming concepts but some C language specifics.
Con Outdated practices / problem solutions
The practices that are shown to solve the problems at hand are rarely, if at all, updated. Usually, their tutorials and learning material is updated only after they see their profits drop.
Con Doesn't care about teaching right
There are multiple errors in the data they show. Although the solutions they show work, they will lead to unmaintainable code. That happens even when the maintainable code alternatives are as easy or accessible to new programmers as the alternatives.
Con Certifications not recognized
Many professionals in IT agree that w3s certifications are not recognized by them and are deemed useless. Good luck finding any respectable professional that accepts a w3s certification.
Con It is for profit
What defines what goes is and what gets fixed on w3schools is what gives them profit and what doesn't (through their ads system).
Con Written tutorials only
While many learning resources offer a mixture of media in their courses (such as videos, challenges etc.), w3schools offers only written tutorials and code editors. This makes w3schools more beneficial as a quick reference rather than a primary learning resource.