C is a programming language developed by Dennis Ritchie in 1972 at bell laboratories of AT&T (American Telephone & Telegraph), located in U.S.A. C inherited many behavior from its ancestor programming languages. Along with the inherited features, some more unique features were developed in C that made it the most basic programming language and the mother of all programming languages.
Features of C:
Some unique features of C are:
- Extensible
- Fast Speed
- Machine Independent or Portable
- Mid-level programming language
- Memory Management
- Pointers
- Rich Library
- Recursion
- Simple to Learn
- Structured programming language
- Procedure-oriented programming language
C as a mother language:
C language is used to write most of the compilers. Also the syntax of C, including its unique features and concepts of array, strings, functions, file handling, pointers, etc are used even today in almost all languages in some way or now. This made it to be considered as the mother language of all the programming languages.
C as a System Programming Language and a Mid Level Language:
C is a high level language as it can be easily developed by a user. However, C can also be used as a low level programming language to develop some system applications such as kernel, driver etc. Thus, it can be better called as a mid-level language, instead of a high level language.
C as a Structured Programming Language:
A structured programming language is the one which can be broken into smaller parts. C supports this feature using multiple functions and is thus called as a Structured Programming Language.
C Compilers:
For executing a C file in a system, C compiler is a must. Various C compilers are available for downloading. Turbo C++ is among some common C compilers.
First C Program:
Lets print “Hello C” as the first C program and than understand it in detail.
#include <stdio.h> void main() { printf ("Hello C!"); } |
Output
Hello C! |
Flow of C program:
Let us consider a C program named Hello.c to understand the execution flow of a C program.
Hello.c Hello.i Hello.asm Hello.obj Hello.exe CONSOLE
C tutorial
- C language overview
- C history
- C features
- How to install C
- First C program
- Flow of c program
- c printf and scanf
- C variables
- C constants
- C data types
- C keywords
- C operators
- C comments
- C escape sequence
- C if else
- C switch
- C for loop
- C while loop
- C do while loop
- C break
- C continue
- C goto
- C type casting
- C functions
- C call by value
- C call by reference
- C recursion
- C storage classes
- C 1D array
- C 2D array
- C array to function
- C pointers
- C pointer to pointer
- C pointer arithmetics
- C dynamic memory
- C string
- C gets puts
- C string functions
- C strlen
- C strcpy
- C strcat
- C strcmp
- C strrev
- C strlwr
- C strupr
- C strstr
- C math functions
- C structure
- C array of structures
- C nested structure
- C file handling
- C fprintf fscanf
- C fputc fgetc
- C fputs fgets
- C fseek
- C rewind
- C ftell
- C preprocessor directive
- C macros
- C preprocessor include
- C preprocessor define
- C preprocessor undefine
- C preprocessor ifdef
- C preprocessor ifndex
- C preprocessor if
- C preprocessor else
- C preprocessor error
- C preprocessor pragma
- C command line argument