Just for an idea i will explain something:

Topdown Approach
Execution starts from top of the program to the end...
Eg: C program
Code:
#include<stdio.h>
void test();
 void main() 
      {
       test();
      }
void test()
{
printf("Test program");
}
 In this program, Execution starts from top of the main function to the bottom ofthe test function.

Eg: Bottom -to -top approach(C++ program)

#include <iostream>
using namespace std;
class sample
{
public:
       void test()
           {
          cout<<"Sample";
          }
};

void main()
        {
        Sample s;
        s.test();
        }
In this program,Execution starts from the bottom of the main function to the test function present in a class.

Last edited by shabbir; 17Oct2007 at 16:17.. Reason: Code block