Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc
 
Introduction to the C Programming Language

INTRODUCTION TO C

The C language is the bedrock of modern computing. So why is it that a company like Well House Consultants, who specialise in niche training, are running a C course? It's because the bedrock is something that, whilst it's there and vital, most people don't need to understand. I expect that most of you couldn't tell me very much about your home's foundations ... how deep are they, what are they made of, what material do they lie on. And in the same way, C is vital to us all, but only a few of us need to learn it.

C is not an "object oriented" language. If you require the bedrock of C and also the extra facilities offered by OO, you can select C++ which offers compatibility with C, and also the extra facilities. But note that they are offered at a price, and that price is a complexity that is not necessary for most people, and not necessary if the under- lying C compatibility can be foregone. That's why you have languages such as Java (from Sun) and C# (from Microsoft) which are developed using the approach of C, and the power of object orientation, but without the C compatibility, and so without much of the low-level coding that C's been so successful with. Perhaps you're looking at a PHP script, or a piece of Python and saying "C isn't important to me".

Actually, it is important.

Your PHP and your Python are written in C (Jython is written in Java and that has the underlying C level). Your web server is written in C. Your operating system is written in C. Don't underestimate C; it is vital to you. It's just that it may not be vital for you to understand it.

COMPILING AND LOADING C PROGRAMS

1. Enter your source code (a file extension .c is common).

2. Compile into an object file (extension .o or .obj ).

This is a binary file that contains machine code for the machine that you'll be running on, but it's not yet a complete program; it's a program component. In effect, your compiling has turned a raw potato into a roasted one, but it's still not a complete meal.

3. Link / Load / Taskbuild your .o or .obj files.

That joins them together into a single conglomerate executable file, and brings in standard library files too, so that the file as a whole can be run. You have now added your Roast Beef, Yorkshire Pudding, and brussel sprouts and made up a complete course.

The compiler will initially run the C pre-processor, which will act on lines starting with a # character. It allows for other files to be included, constants defined, and selective-debug code and system-dependent code to be included as appropriate.

The whole process of one or more compiles followed by a link may be defined in a makefile. The Makefile defines the commands necessary for each step of the process, and also lets you define which file depends on which other file. The net effect of this is to enable the compiler to skip over files that haven't been changed since you last did a compile by looking at the timestamp on the .c file in relation to the timestamp on the .o . It's very clever; I remember back to "pre-make" days and running compiles and loads of a big CAD system I wrote that took nearly an hour to process!


See also Training Course - C Programming

Please note that articles in this section of our web site were current and correct to the best of our ability when published, but by the nature of our business may go out of date quite quickly. The quoting of a price, contract term or any other information in this area of our website is NOT an offer to supply now on those terms - please check back via our main web site

Related Material

C and C based languages - C - General
  [4434] Public training courses - upcoming dates - (2015-02-21)
  [4341] Segmentation Fault, Segmentation Violation, Bus Error, Stack Smashing - (2014-12-04)
  [4335] Flexible public courses - residential or commuting, programming newcomer or experienced, C or C++ - (2014-11-30)
  [3129] Extra courses - C and C++ - (2011-01-12)
  [3053] Make - automating the commands for building and installing - (2010-11-16)
  [2848] C course - final course example puts it all together - (2010-07-02)
  [2763] Our C and C++ training course are on Open Source platforms - (2010-05-13)
  [2669] Efficient use of dynamic memory - C and realloc - (2010-03-10)
  [2536] All the Cs ... and Java too - (2009-12-13)
  [2504] Learning to program in ... - (2009-11-15)
  [2091] C, C++ and C# ... Java and JavaScript - (2009-03-20)
  [2086] C Programming v Learning to Program in C. Which course? - (2009-03-17)
  [2002] New C Examples - pointers, realloc, structs and more - (2009-01-20)

C and C based languages - Introduction to C
  [2842] Staring a C course with Hello World - why? - (2010-06-30)
  [1933] Learning to Program in C - (2008-12-10)
  [885] Why do we still need C? - (2006-10-03)
  [336] Targetted Advertising - (2005-06-05)
  [318] Choosing a theme - (2005-05-20)
  [317] Programming languages - a comparison - (2005-05-20)
  [304] Training courses in the C language - (2005-05-07)

resource index - Linux
Solutions centre home page

You'll find shorter technical items at The Horse's Mouth and delegate's questions answered at the Opentalk forum.

At Well House Consultants, we provide training courses on subjects such as Ruby, Lua, Perl, Python, Linux, C, C++, Tcl/Tk, Tomcat, PHP and MySQL. We're asked (and answer) many questions, and answers to those which are of general interest are published in this area of our site.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2019: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/solutions/linux-in ... guage.html • PAGE BUILT: Wed Mar 28 07:47:11 2012 • BUILD SYSTEM: wizard