Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Top and Bottam (http://www.go4expert.com/forums/top-and-bottam-t6879/)

vkiransrinivas 17Oct2007 12:02

Top and Bottam
 
Actually what do you mean by top to bottam and bottam to top.Can i have difference between top to bottam approach and bottam to top approach

seeguna 17Oct2007 16:12

Re: Top and Bottam
 
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.

shabbir 17Oct2007 16:18

Re: Top and Bottam
 
seeguna, have code blocks for code snippets in the posts

vkiransrinivas 23Oct2007 11:10

Re: Top and Bottam
 
thanks for sending seeguna some explain on theortically with some languages if possible send me


All times are GMT +5.5. The time now is 20:07.