C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 19)
19.
Which of the following approach is adapted by C++?
Top-down
Bottom-up
Right-left
Left-right
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
27 comments Page 2 of 3.

Alakya said:   10 years ago
Usually in C language, the functions are given priority then the data types. First the main functionality of the program is discussed and then the subroutines to modularize the code into smaller parts are decided. Hence it's called top down approach.

Prashant said:   1 decade ago
If we use functional approach it is top down, and when we follow object oriented approach then it is bottom up approach.

So C always uses top down approach, whereas C++ also uses bottom up approach.

Kunj patel said:   4 years ago
The declaration has placed after the function made to be called then the main function compiles to be. These were the difference between the C programming and the c++ programming.
(1)

Sathish said:   9 years ago
The declaration has placed after the function made to be called then the main function compiles to be. These were the difference between the c programming and the c++ programming.

Harshita said:   1 decade ago
In Top Down approach main function should be at the top, ie other function definetion are after main, while in bottom up approach we can define main ayewhere in our program.

Spjsp said:   1 decade ago
As OOP operates on classes so, if we declare main before it then there will be an error like main() has an object whose associated class is not declared.

Durgadevi said:   1 decade ago
Because we use main function in c++ at anywhere but the compiler starts to compile the program in main function so it is called as bottom up approach.

Ratnesh said:   1 decade ago
Because main function define after define of class but compiling process start from main function. Invoking object call function from classes.

Ashik said:   1 decade ago
It just follows the bottom-up approach. Not compulsory that it may go bottom-up any time.

Shivendra said:   1 decade ago
Can some one clearly elaborate these two words that is top down and bottom up approach.


Post your comments here:

Your comments will be displayed after verification.