Wednesday, July 14, 2010

C++: What is a program and a programming language?

I thought I should introduce what exactly is a program and the definition of
a programming language first before I continue with this series...

A program is a collection of instructions that a computer should follow to
perform a task. Think of it as a manual for computers that has exacting
steps for it to follow. Programs include a small program such as a
calculator to huge ones such as operating systems such as Microsoft Windows.
(yes, an operating system is indeed a program, folks - well, a special type
of program really).

But computers have a huge drawback: they don't know what the word "Hello"
means. The only language that a silicon chip knows is 0's and 1's - called
binary numbers. To help us write messages such as "Hello World" and tell the
computer to print it to a monitor, we (the programmers and would-be
engineers) use a special "tool" called a programming language. Programming
language is a high-level collection of instructions that a program should do
(high-level means languages such as English). There are so many programming
languages out there, including C++, C, BASIC, Java and so forth. Some were
customized for tasks such as LISP for artificial intelligence, while others
are general-purpose languages - they are used to write virtually any
programs. C++, the language that we'll tackle in this notes series, is a
general-purpose language that is not that hard to understand its syntax (how
the language is worded).

So, let's start the tour, shall we by writing a simple program...
// JL

No comments:

Post a Comment