C language Basics, C language source code links, Simple programs in c language, C vs C++ vs java, Example of a C program

Here we will discuss about how to develop a simple program in C language.

C language is successor of b language. It was developed by Dennis Ritchie at Bell laboratories in early seventies .C language

is considered as the first step to learn programming basics. After learning C language we can easily learn higher languages such as C++,Java etc. C is a combination of high level language as well as low level language and therefore it is considered as middle level language.   

C's primary use is for "system programming", including implementing operating systems and embedded system applications, due to a combination of desirable characteristics such as code portability and efficiency, ability to access specific hardware addresses, ability to "pun" types to match externally imposed data access requirements, and low runtime demand on system resources.

C programs can be compiled by a c compiler such as Borland c compiler.

Example of a C Program

#include<stdio.h>                     //Header file

#include<conio.h>                    //Header file

#define Max 25                        //Max=25

void main()                              //Function main

{

    int a,b,c;                              //Variable declaration

    clrscr();                               //Clear screen

    printf("Enter two values");   //Printing

    scanf("%d%d",&a,&b);      //Scanning

    c=Max*a*b;                     //Arithmetic logic

    printf("%d",c);                   //print c

    getch();                             //Program end

}

This program prints out "hello, world" to the standard output, which is usually a terminal or screen display. Standard output might also be a file or some other hardware device, depending on how standard output is mapped at the time the program is executed.

main()
{
    printf("hello, world\n");
}

 

Link:Chak De India

ABC of Electronics

Everything on Electronics

Other Links:

IPL CRICKET TEAMS                              YUVRAJ SINGH                                    BRIAN LARA

Google