Pages

Adhexa

Monday, July 19, 2010

First Program

The quickest way to learn a programming language is to write a simple program and analyse it. The first program to write is same in all programming languages i.e to output the words “Hello World”.

The C program which does this is:
#include <stdio.h>
main (){
printf(“Hello World”);
}

The C++ program which does this is:
#include <iostream.h>
using namespace std;
main (){
cout<<“Hello World”;
}

No comments:

Post a Comment