C Language:-

C language is a genral purpose high level language. It was developed in 1972 at BELL Labs of AT&T,US. The purpose for inventing this language, was to develop a powerful, secure and reliable operating system parallel to windows. This OS was named UNIX.

A sample program.

#include< conio.h>
void main()
printf("this is my first program");

Header files-:

In c language ,header files are speecial files with [h] extension these files store the definition of different copmplex keywords functions and other grammer elements .when we use any keyword or any function in our program we must include the respective header file.

Header file -: stdio.h

  • printf()
  • scanf()
  • getchar()
  • put char()
  • gets()
  • puts()

Header file -: conio.h

  • clrscr()
  • getch()

Header file-:math.h

  • pow()
  • sqrt()
  • log()
  • sin()

Header file-:stdlib.h

  • abs()
  • exit()

The main function -:

main() function is a function in C that combines entire program logic in a bundle and when we execute our C program the compiler calls this main function the trhrows the final output of entire program on the output screen.

The Brace Structure -:

In a C program Brace simply work like delimiters

The clrscr() function-:

clrscr() function is a predefined function that works foir clearing the screen.

The printf()function-:

This function is used widly in C for printing some text or messages on to the console screen

The getch()function-:

This function is defined in conio.h and it works for getting a single character from console screen.

A sample program-:

#include< stdio.h>
#include< conio.h>
void main()
clrscr();int a,b,c;

  • Variables -:In this line we have declared these variables of integer data type these are a,b,c.
  • Assigning values to variables-:We must assign values to our variables before we work with them
  • Here , contents of a and b are being multiplied and transfered or assigned to C.
  • printf function is being used here in different style actually we are displaying the value of C printf("%d",c);
  • %d -: Control string/format specifier for integer data type.


Token is nothing but the basic building block of a single instruction in C. A token can be a keyword,or a variable or a constant or an operator.
Tokens in c -:
  1. Keywords
  2. Constants
  3. Variables
  4. Operators


Keywords are special words that are used too often in C programming, these words simply activate their meanings wherever these are used.

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    sizeof    volatile    do    if   static    while