Tag Archives: C

Fibonacci and C arrays- the perfect combo

New year upon us and back to the C training. Tonights mission was to output Fibonacci numbers via an array. The Fibonacci sequence is a sequence of numbers where the next number is the sum of the previous 2 numbers. … Continue reading

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

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

Objectionable C

Clearly my day to day work with Perl was not taking up enough time and I’m ‘quite’ interested making an iPhone application, so here i am at the gates of ‘Objective C’ and looking for that elusive ‘Hello World’. At … Continue reading

Posted in C | Tagged , , | Leave a comment