Tag Archives: K&R

C character arrays (K&R exercice 1-17)

Back on the K&R book, still working through the ‘Tutorial Introduction’ and in the character array section. Here is my solution to Exercise 1-17: print out all lines with 80 or more characters. #include <stdio.h> #define MAXLINE 1000 // This … Continue reading

Posted in C | Tagged , , , , | Leave a comment

Starting C for Perl coders

In my quest to write an ‘app’ for the iPhone, I’ve been sidetracked into learning ANSI-C from scratch to give me a grounding for C++ and Objective-C. Why you may ask? Well it occurred to me that as FreeBSD in … Continue reading

Posted in C | Tagged , , , , | Leave a comment

C Arrays

Here are some C programs from the K&R book with reference to arrays. This resonated with the Perl hashes as this task is nearly always done with a hash, but as C has no hashes, here we go with an … Continue reading

Posted in C | Tagged , , , | Leave a comment