projects
- intro (due 20140124)
- "Hello, World!" (due 20140131)
- data types (due 20140207)
- Squares (due 20140214)
- Day of Week (due 20140221)
- Nikhilam (due 20140228)
- Multiply by 11 (due 20140307)
- Vertically and Crosswise (due 20140321)
projects
This is an old revision of the document!
It is time to develop and deploy your first program!
A C program's code is referred to as source code, or the list of instructions indicating what we'd like the computer to do, and is in a more human-readable (and writable) form- the computer cannot natively understand it.
Just as with any language (think English, French, Spanish, LOLspeak, etc.) there is a structure and form- rules indicating how we can arrange various tokens (words, punctuation marks) as well as the particular words themselves (vocabulary).
Different words have different roles in sequences of words (what we'd call a sentence)… there are nouns and verbs and adjectives and adverbs, among others.
In many languages, verbs (the action words) are conjugated to fit the particular case it is being used.
For example:
Some verbs see only minor spelling changes (run, runs, ran). Others, as a result of language evolution, may see more drastic changes as they are put into context:
We (should) know this from all our years of experience with our particular known language(s). Even if English isn't your first language, these same sorts of rules hold true- you know how to arrange your given tokens in a way to effectively communicate to others.
And programming is no different: we are learning a foreign language, in this case an intermediary language between a human language (English) and a computer language (Machine Language).
The language we'll be learning is one of the most popular and influential in the realm of computing. It is over 40 years old and is showing no sign of being replaced anytime soon (although many derivatives exist, and some of those derivatives may see statistically higher usage). This language of course is C.
As indicated, C has a number of derivative languages that have been developed over the years. This is very much like learning Latin, then going on to learn one of its derivations (the so-called “Romance Languages”)… the structure is very similar, and a good deal of vocabulary may well be shared.
So it is with C… by learning this “root” language (note that C itself is a derived language), with a little effort you should be able to easily pick up C++ (which we will be exploring later this semester), Java, Objective C, C#, or PHP, to name a few.
C is classified as a structured/procedural/imperative paradigm of programming language (therefore all its derivations are similarly rooted in that paradigm).
To get a taste of some of the various programming paradigms out there, do a google search for programming paradigms. There is also a Wikipedia article on programming paradigms.
Ultimately, we will be focusing on learning imperative programming in C first, and then once we have picked that up effectively, transition to C++ and encounter some of its object-oriented capabilities.
By no means should you consider this the end all, be all of all possible computer programming languages. It may be the most practical and most taught and most encountered for the range of problems you are used to encountering (or have been taught to express solutions in), but it is not everything.
If you are serious in continuing on this path of study in Computer Science, you would do well to learn some additional languages, especially those outside the imperative paradigm, and those with grammars unlike C and its derivatives.
Some recommendations: