CITS2002 Systems Programming  
prev
next CITS2002 CITS2002 schedule  

So what is C?

A programming language that doesn't affect the way you think about programming isn't worth knowing. Alan Perlis, 1st Turing Award winner

In one breath, C is often described as a good general purpose language, an excellent systems programming language, and just a glorified assembly language. So how can it be all three?

C can be correctly described as a general purpose programming language -
a description also given to Java, Python, Visual-Basic, C++, and C#.

C is a procedural programming language, not an object-oriented language like Java, (parts of) Python, Objective-C, or C#.

C is more mow(the_lawn);  than  lawn.mow_thyself();

C programs can be "good" programs, if they are:

  • well designed,
  • clearly written,
  • written for portability,
  • well documented,
  • use high level programming practices, and
  • well tested.

Of course, the above properties are independent of C, and are offered by many high level languages.

  • C has programming features provided by most procedural programming languages - strongly typed variables, constants, standard (or base) datatypes, enumerated types, user-defined types, aggregate structures, standard control flow, recursion, and program modularization.
  • C does not offer tuples or sets, Java's concept of classes or objects, nested functions, subrange types, and has only recently added a Boolean datatype.
  • C does have, however, separate compilation, conditional compilation, bitwise operators, pointer arithmetic, and language independent input and output.

An important note: C and C++ are very different languages, with some common syntax and semantics. Webpages, blogs, career-positions, and even textbooks that promote "C/C++" as a single language, do not know what they are talking about.

 


CITS2002 Systems Programming, Lecture 1, p5, 22nd July 2024.