Search Helium

Home > Computers & Technology > Software > Software & Web Development

Getting started with C programming

by Jeffrey Graf

Created on: March 12, 2010

 There's really no reason to start C programming by digging into the code. Most college students are forced to take a full semester of programming, and often do it with C, and yet they never know what hit them, other than they typed some codes into a computer.

  C is not designed as an instructional language. It has been called a "systems language". In the early days of computing, there were high level languages like FORTRAN and COBOL which attempted to provide a procedural, human readable syntax programming model to users. But, this model tended to break down at the level of implementing common functions of the operating system, and so these "system" components had to be coded in assembler, a system of codes that correspond directly with machine binary codes.

The drawback of assembler coding is that it cannot be transported between machines with different processors. Since a given department might have a number of different types of machines, people did not want to rewrite the same program for each machine. The idea then was to create a programming language which could do the systems work of an assembler, and yet was abstract enough to be transportable between machines with different processors.

 So then, it is important in understanding why C does things the way it does, to understand the abstraction of the underlying machine.  A computer's memory is a linear array of words, each word being made up of a given number of bits. A typical word size is 32 bits, and each bit corresponds to a single switch capable of encoding a value of 0 or 1, and hence is called binary.  Each word in our array of memory locations is denoted by a particular address. You can visualize a row of lockers in a hallway, where each locker has a number on it, and is capable of holding 32 bits of data.

The data in a word can be formatted, or interpreted to hold any kind of data, an integer, a floating point number, text or character data, or a system of individual true/false flags. A locker or word can even be used to hold the address of another locker. When we use a data storage area to hold the address of another data storage area, we call it a "pointer".  The C programming language makes heavy use of pointers, and in fact many of the constructs of the language are built upon the concepts of pointers. When you reference the value of a variable using an address, or pointer, that is referred to as "indirection".    

There are many reasons

Helium Debate

Cast your vote!

Is Microsoft Office Professional a better software suite than OpenOffice?

Click for your side.

190286

Featured Partner

The MAGIC Foundation for children's growth

Major Aspects of Growth In Children (MAGIC) is made up of 25,000+ families whose children (and affected adults) have growth hormone deficiency or other medical conditions which affect their growth. While growth hormone deficiency is the ...more


CONNECT WITH US

Read
our blog
Helum for writers

Write and get published
Share with other writers
Polish your freelancing skills

Join our active writing community
Helium Content Source for Publishers

Quality articles from proven freelancers
Exclusive rights, fast turnaround
Brand engagement, business blogging -- our writers do it all

Get custom content today!

INFORMATION


Helium, Inc.
200 Brickstone Square Andover, MA 01810 USA
#