C programming tutorial

  • C is an ANSI/ISO standard and powerful programming language for developing real time applications. C programming language was invented by Dennis Ritchie at the Bell Laboratories in 1972. It was invented for implementing UNIX operating system.
  • C programming is most widely used programming language even today. All other programming languages were derived directly or indirectly from C programming concepts. C programming is the basis for all programming languages.
  • This C programming tutorial explains all basic concepts in C like history of C language, data types, keywords, constants, variables, operators, expressions, control statements, array, pointer, string, library functions, structures and unions etc.

This C programming tutorial is designed for the new learners, students and also for the corporate level developers who want to learn and refresh their C programming skills.

Start with C programming tutorial

C programming tutorial topics:

C programming history:

The C language is a structure oriented programming language, was developed at Bell Laboratories in 1972 by Dennis Ritchie. C language features were derived from an earlier language called “B”….more…

C programming basics:

Steps to be followed for any C program to create and get the output are explained . This is common to all C programs and there is no exception, whether its a very small C program or very large program….more…

C – printf and scanf:

printf() and scanf() functions are inbuilt library functions in C which are available in the C library by default. These functions are declared and related macros are defined in “stdio.h” which is a header ….more…

C – Data Types:

C data types are defined as the data storage format that a variable can store a data to perform a specific operation. Data types are used to define a variable before using in a program. Size of variable, const….more…

C – Tokens and keywords:

C tokens, Identifiers and Keywords are the basics in a C program. All are explained in this page with definition and simple example programs….more…

C – Constants:

C Constants are also like normal variables. But, the only difference is, their values can’t be modified by the program once they are defined….more…

C – Variables:

C variable is a named location in a memory where a program can manipulate the data. This location is used to hold the value of the variable….more…

C – Operators and Expressions:

The symbols which are used to perform logical and mathematical operations in a C program are called C operators. These C operators join individual constants and variables to form expressions. Operators…more…

C – Decision Control statement:

In decision control statements (C – if else and nested if), group of statement is executed when the condition is true.  If  the condition is false, then, else part statements are executed. In C programming, there are 3 types…more…

C – Loop control statements:

Loop control statements in C programming are used to perform looping operations until the given condition is true. Control comes out of the loop statements once the condition becomes false…more…

C – Case control statements:

The statements which are used to execute only specific block of statements in a series of blocks are called case control statements. There are 4 types of case control statements in C programming…more…

C – Type Qualifiers:

The keywords which are used to modify the properties of a variable are called type qualifiers. There are two types of qualifiers available in C programming. They are…more…

C – Storage Class Specifiers:

Storage class specifiers in C programming tell the compiler where to store a variable, how to store the variable, what is the initial value of the variable and lifetime of the variable…more…

C – Array:

C Array is a collection of variables belongings to the same data type. You can store group of data of the same data type in an array. There are 2 types of arrays in C programming. They are…more…

C – String:

C Strings are nothing but array of characters ended with null character (‘\0’). This null character indicates the end of the string. In C programming, strings are always enclosed by double…more…

C – Pointer:

C Pointer is a variable that stores/points the address of the other variable. C Pointer is used to allocate memory dynamically,  i.e. at run time. The variable might be any of the data types such as int, float, char…more…

C programming tutorial with example programs:

C – for, while and do while Example Programs
C – switch, break, continue and goto Example Programs
C – auto, static, extern and register Example Programs
C  - array Example Programs
C – string Example Programs
C – pointer Example Programs
C – function Example Programs
C – structure Example Programs
C – typedef Example Programs
C – union Example Programs
C – typecast Example Programs
C – undef and #define Example Programs
C – command line argument Example Programs
C – variable length argument Example Programs
C – malloc, calloc, realloc and free Example Programs

Real Time C Programming examples:

  • When you complete this c programming tutorial, you can able to write real time C programs by your own. We are walking you through all topics in this c programming tutorial which are explained clearly even for very beginners for C programming.
  • We have given few real time application programs with output in this C tutorial.

Real time application and C programming examples for reference:

1. C program example – Real time Calculator program
2. C program example – Real time Bank Application program


Start with C programming tutorial

C programming tutorial reference E-books & research papers:

  • [ANSI 89] American National Standards Institute, American National Standard for Information Systems Programming Language C, X3.159-1989.
  • [Kernighan 78] B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall: Englewood Cliffs, NJ, 1978. Second edition, 1988.
  • [Thinking 90] C* Programming Guide, Thinking Machines Corp.: Cambridge Mass., 1990.

Share this C Programming tutorial with your friends