How am I expected to do the exercises in pic related...

How am I expected to do the exercises in pic related? The majority of them found in chapter 1 require you to use concepts that aren't introduced until many chapters later, for example, 1-23 makes you write a program to strip comments, but that requires you read/write files which is introduced in chapter 7. Am I supposed to complete the book THEN go back and do the exercises? Or is this book in general a flawed resource to use?

Attached: cover.png (792x1023, 104K)

Other urls found in this thread:

icube-icps.unistra.fr/index.php/File:ModernC.pdf
twitter.com/SFWRedditImages

99% of programming is learning to use google. you may think you know how to use google, but you don't. otherwise you would have already completed the exercises and wouldn't be complaining on here. btw a true pajeet doesn't ask until after something is broken/on fire.

>for example, 1-23 makes you write a program to strip comments, but that requires you read/write files which is introduced in chapter 7
Use pipes, retard

>Using dead, deprecated language.

Have fun re-learning an OOP language and throwing out the trash after you get done with that book.

>also not introduced until a later chapter

You don't need to read/write a file to strip comments. Just redirect whatever you want to strip and write it to stdout.
K&R is the best C book, but that doesn't mean it suits everyone for starting out, especially beginners. Go for a more
modern resource which will make you aware of overwriting buffers or causing memory leaks and other flaws due to
incompetence.

K&R should be a second book after you've learned C and know the basics of unix system programming for the exercises
and reference alone.

already know java, python, and all the web meme-tier languages. ended up falling for the Sup Forums meme and started learning C in my spare time

K&R can almost be seen as a straight to the point type of book to teach a person C. If you have no experience with unix or havent been exposed to anything like it, then you might have issues learning from it. I'm thoroughly enjoying going through it myself though

I was able to google well enough and implement fopen and read it in there, but then I wondered what the point of the book was if I'd have to read up tutorials/documentation online anyway

C is a perfectly fine language with 90% crossover to C++. there's also OOP aspects of C. It's also a good base for lots of scripting languages.

i have no idea, it may have been written as a college course work instead of a DIY book.

You name the course, i've taken it, and you get thrown into everything you mentioned in the first few weeks. We were doing read/write in txt and ini files on our 2nd day of intro to java. There's all kinds of shit you can get into for just reading files and manipulating data in an external file or attachment. but the fundamentals you should know and aren't hard to figure out.

take this book with a grain of salt. it was written by geniuses so if you're a beginner they expect a lot from you, especially if you're self taught. as some user already said, learn from somewhere else, doing your own research, googling, then come back to it later.

>not knowing C before learning C

Attached: 1506610241340.png (629x504, 36K)

Why are you learning a 40 year old obsolete version of the language? I have a book on C# 1.0 you can have while you're at it.

>C is a perfectly fine language
>with no Windows support beyond C89

pick a language, it doesn't matter. learn one, learn them all. if someone is interested in using C for w/e reason, let him. it really does not matter, it's more important to get a feel for writing algorithms, using documentation, troubleshooting, setting up your ide, hooking up libraries,etc,etc. he's complaining about opening a txt file.

I have no loyalty to language, i think that is a stupid approach. i'll use whatever i think is appropriate for the job.

>learning C in 2018

Attached: c-programmers.jpg (492x490, 42K)

>mfw I'm a bassist and C enthusiast

Attached: 1492953827837.png (531x339, 10K)

>mfw first language was C++ and I never touched C, instead opting to learn more useful languages like C#, Python, Js, TS and so on
>somewhat stable job as a self-taught webdev

Attached: 9-d903acaa8ee3c6ed19c63fc677de075c.jpg (609x800, 186K)

It's a meme book OP. Try going through this one instead:
icube-icps.unistra.fr/index.php/File:ModernC.pdf

if you write software in c89, it is easly compileable in 30 years.

>learning basic unix shell from a book about C

>reading book when internet exist

Seriously?

Attached: maxresdefault.jpg (1280x720, 88K)

The book was obviously published before google anyway, I think OP is just a brainlet

Attached: warn.jpg (500x341, 105K)

>t. pajeet codemonkey

I often wonder how anyone is meant to find out the rules to any programming language. I always expected something like math; a book that just shows you all the operations and some examples. Yet all I ever see by googling them are snippets and examples of what the language can do. Like how am I supposed to learn the language if you don't show me every possible command it can understand and perform? Am I supposed to dick around and guess? Just know?

Also chapter 1:

> while ((c = getchar()) != EOF)
> EOF
> nothing works

If you don't enjoy finding out why then C probably isn't for you.
hint: security

Attached: 1520697304639.jpg (2300x1594, 675K)

But you don't write "EOF", yea?

Attached: images8.jpg (564x544, 29K)