1.2. Relationship of C to other programming Languages¶
1.2.1. Java and Python¶
- Java and Python are both good language for learning object oriented programming.
- They have rich libraries for implementing graphics, which is difficult in C.
- Lack of pointers removes a challenge which C/C++ programmers face.
- Platform independence adds to their utility.
- Lack of low level programming features, e.g. no pointers, Java’s strict enforcement of the object oriented paradigm and slow speed limit its usefulness for certain tasks, especially systems programming.
- Just FYI … Python is easier to learn than Java because programmers are not required to use the object oriented programming paradigm.
1.2.2. C++¶
- Fast execution speed, same low level programming support as C, plus the benefits of object oriented programming.
- Currently the most popular language for large commercial programming projects.
- Difficult to learn for beginners.
1.2.3. C¶
Very fast, non-object oriented language.
Do not view C as just a learning language, which is needed to help one understand C++. Many very fine programs are written in C. It is typically easier and faster to write small to medium size programs in C than C++.
C is considered a high level language. (Assembly language is a low level language.) Although it is obviously a lower level language than Java.
- Low level = Easy manipulation of the hardware
- High level = relying on lower level software levels to implement tasks with a minimal amount of code.
C is less restrictive than most languages, especially in relation to conversion of data to different data types. Thus, C is more flexible and also easier to program wrong.
C is a small language in terms of the number of built-in keywords. Older languages such as Pascal and Fortran have many more built-in keywords / features. In C, functions (from libraries) are heavily used.
All data variables and functions must be defined before use. C does not have look-ahead capability.
C is well suited for systems programming.
1.3. History of C¶
C was developed at Bell Labs in the early 1970’s. It was developed to be the primary programming environment of Unix. C evolved from two previous programming languages, BCPL and B. In 1972, Dennis Ritchie completed the first C compiler. In 1983, the American National Standards Institute (ANSI) began to work on a C standard with the goal of making C portable between systems and unambiguous. In 1989, the ANSI C standard was approved.