Posted on 9th September 2009One Response
“C” Mother Language of Programming Languages – An Overview

To understand C++ is to understand the forces that drove its creation, the ideas that shaped it, and the legacy it inherits. Thus, the story of C++ begins with C. Since C++ is built upon C. Much of what makes C++ what it is had its genesis in the C language.

The Origin of “C” Language

“C” Language was invented and first implemented by Dennis Ritchie on a DEC PDP-11 that used the Unix operating system. C is the result of a development process that started with an older language called BCPL. BCPL was developed by Martin Richards, and it influenced a language called B, which was invented by Ken Thompson. B led to the development of C in the 1970s.

"C" Programming Language

"C" Programming Language

“C”- Is a Middle Level Language

“C” is often called a middle-level computer language. This does not mean that C is less powerful, harder to use, or less developed than a high-level language such as BASIC or Pascal, nor does it imply that C has the cumbersome nature of assembly language (and its associated troubles). Rather, C is thought of as a middle-level language because it combines the best elements of high-level languages with the control and flexibility of assembly language.
As a middle-level language, C allows the manipulation of bits, bytes, and addresses—the basic elements with which the computer functions. Despite this fact C code is also very portable.
PORTABILITY means that it is easy to adapt software written for one type of computer or operating system to another. For example, if you can easily convert a program written for DOS so that it runs under Windows, that program is portable.
Highest Level Languages
Ada
Modula-2
Pascal
COBOL
FORTRAN
BASIC

Middle Level Languages
Java
C++
C
FORTH

Lowest Level Languages
Macro-assembler
Assembler

C’s Place in the World of Programming Languages.
All high-level programming languages support the concept of data types.
DATA TYPE defines a set of values that a variable can store along with a set of operations that can be performed on that variable. Common data types are integer, character, and real.
Although C has five basic built-in data types, it is not a strongly typed language, as are Pascal and Ada. C permits almost all type conversions. For example, you may freely intermix character and integer types in an expression. Unlike a high-level language, C performs almost no run-time error checking. For example, no check is performed to ensure that array boundaries are not overrun. These types of checks are the responsibility of the programmer.

“C”- Is a Structured Language

C is commonly referred to simply as a structured language. It has many similarities to other structured languages, such as ALGOL, Pascal, and Modula-2. The distinguishing feature of a structured language is compartmentalization, of code and data. This is the ability of a language to section off and hide from the rest of the program all information and instructions necessary to perform a specific task.

A structured language allows you a variety of programming possibilities. It directly supports several loop constructs, such as while,do-while, and for. A structured language allows you to place statements anywhere on a line and does not require a strict field concept (as some older FORTRANs do).
Here are some examples of structured and nonstructured languages:
STRUCTURED
C++
C
Modula-2

NON-STRUCTURED
FORTRAN Pascal
BASIC Ada
COBOL Java
C’s main structural component is the function—C’s stand-alone subroutine. In C, functions are the building blocks in which all program activity occurs. They let you define and code separately the separate tasks in a program, thus allowing your programs to be modular. After you have created a function, you can rely on it to work properly in various situations without creating side effects in other parts of the program. Being able to create stand-alone functions is extremely critical in larger projects where one programmer’s code must not accidentally affect another’s.

“C”- Is a Programmer’s Language

C was created, influenced, and field-tested by working programmers.
The end result is that C gives the programmer what the programmer wants: few restrictions, few complaints, block structures, stand-alone functions, and a compact set of keywords. By using C, you can nearly achieve the efficiency of assembly code combined with the structure of ALGOL or Modula-2. It’s no wonder that C and C++ are easily the most popular languages among topflight professional programmers. Initially, C was used for systems programming. A systems program forms a portion of the operating system of the computer or its support utilities. For example, the following are usually called systems programs:
• Operating systems
• Interpreters
• Editors
• Compilers
• File utilities
• Performance enhancers
• Real-time executives
As C grew in popularity, many programmers began to use it to program all tasks because of its portability and efficiency—and because they liked it! At the time of its creation, C was a much longed-for, dramatic improvement in programming languages. Of course, C++ has carried on this tradition.

The Form of “C” Program

There is 32 keywords that, combined with the formal C syntax, form the C programming language. Of these, 27 were defined by the original version of C. These five were added by the ANSI C committee: enum, const, signed, void, and volatile.
Auto double int struct
break else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto size of volatile
do if static while

Here is a list of some commonly used extended
keywords:
asm _cs _ds _es
_ss cdecl far huge
interrupt near pascal
All C (and C++) keywords are lowercase. Also, uppercase and lowercase are different: else is a keyword; ELSE is not. You may not use a keyword for any other purpose in a program—that is, you may not use it as a variable or function name.

Global Declarations

return-type main(parameter list)
{
statement sequence
}
return-type f1(parameter list)
{
statement sequence
}
return-type f2(parameter list)
{
statement sequence
}
.
.
.
return-type fN(parameter list)
{
statement sequence
}

The general form of a C program.

Understanding the .C and .CPP File Extensions

Traditionally, C programs use the file extension .C, and C++ programs use the extension .CPP. A C++ compiler uses the file extension to determine what type of program it is compiling. This is important because the compiler assumes that any program using the .C extension is a C program and that any file using .CPP is a C++ program.
One last point: Although C is a subset of C++, So, there are a few minor differences between the two languages and in a few cases, you may need to compile a C program as a C program (using the .C extension).

Popularity: 1% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • BlinkList
  • blogmarks
  • BlogMemes Fr
  • BlogMemes Sp
  • Blogosphere News
  • blogtercimlap
  • co.mments
  • connotea
  • Current
  • Design Float
  • Diigo
  • DotNetKicks
  • DZone
  • eKudos
  • email
Comments
comment by rhinoplasty
Posted on September 24, 2009 at 4:50 am

Nice site!

Leave a Response