next up previous contents
Next: 5.4 Perl and PHP Up: 5 Choosing a Language Previous: 5.2 BASIC   Contents

5.3 C and C++

Perhaps the most important modern programming language is C and its descendant C++ (to simplify the notation, I will simply refer to C with the understanding that I am also referring C++). C is a language written in the early 1970's by programmers for programmers. The design concept was to generate a language suitable for systems programming. As a result, properly coded C is stripped down and very fast. Unix and MS Windows are both written mostly in C for this reason. C offers the programmer the ability to produce fast programs, customized and highly abstract data structures and is very portable (C source code written on a Windows PC will often compile and run without modification on a Unix Cray).

The downside of C is the learning curve. C is a very powerful language with a lot of positive attributes-for those who know how to exploit it. On the other hand, a beginning programmer will very likely get frustrated when his first C programs do not work, as C requires far more of the programmer in terms of syntax, structure, data structuring, memory management, etc. Creating a simple "Hello World" program in C is not terribly difficult, but the novice programmer will most likely scratch his head at the inclusion of several of the lines of code required. Here is an example of a very basic C (not C++) ``Hello World'' program:

main()

{

   printf(``Hello World'');

   return;

}

Since C is mostly used by experienced programmers, the C compilers themselves tend to be more obscure to the novice. Further, like the compilers, the online resources and books available for C have more of a tendency to use specialized, technical jargon. There seems to be an assumption that if you are reading about C you are already a programmer. There are beginner books available, but they comprise a smaller percentage of the C literature than in the BASIC literature.


next up previous contents
Next: 5.4 Perl and PHP Up: 5 Choosing a Language Previous: 5.2 BASIC   Contents
John S. Riley, DSB Scientific Consulting