- C Programming Tutorial
- C - Home
- C - Overview
- C - Environment Setup
- C - Program Structure
- C - Basic Syntax
- C - Data Types
- C - Variables
- C - Constants
- C - Storage Classes
- C - Operators
- C - Decision Making
- C - Loops
- C - Functions
- C - Scope Rules
- C - Arrays
- C - Pointers
- C - Strings
- C - Structures
- C - Unions
- C - Bit Fields
- C - Typedef
- C - Input & Output
- C - File I/O
- C - Preprocessors
- C - Header Files
- C - Type Casting
- C - Error Handling
- C - Recursion
- C - Variable Arguments
- C - Memory Management
- C - Command Line Arguments
- C Programming useful Resources
- C - Questions & Answers
- C - Quick Guide
- C - Useful Resources
- C - Discussion
Explain top-down design and structure chart of function in C language
A function is a self-contained block that carries out a specific well defined task.
Advantages of functions in C language include −
- The length of the program can be reduced.
- It is easy to locate and find any faulty function.
- It facilitates top-down modular programming.
Top down design and structure charts
It is a problem solving method in which a complex problem is solved by splitting into sub problems.
Structure chart is a documentation tool that shows the relationships among the sub problems of a problem.
The splitting of a problem into its related sub problems is the process of refining an algorithm. For example, performing arithmetic operations on 2 numbers, we can do the following −
- Find sum.
- Find difference.
- Find product.
- Find quotient.
Refined algorithm for first step is as follows −
- Take 2 numbers a, b
- Find sum, c = a + b
- Print sum
- Related Articles
- Explain the accessing of structure variable in C language
- Explain linear data structure queue in C language
- Explain Squeeze Function C language
- Explain bit field in C language by using structure concept
- Explain the dynamic memory allocation of pointer to structure in C language
- What is Top-Down Parsing with Backtracking in compiler design?
- What is Top-Down Parsing Without Backtracking in Compiler Design?
- Explain recursive function in C language with program
- What are the loop control statements in C language? Explain with flow chart and program
- Structure declaration in C language
- Explain feof() function in C language with a program
- How to pass individual members of structure as arguments to function in C language?
- Add and Search Word - Data structure design in C++
- Explain the pointers for inter-function communication in C language.
- What is union of structure in C language?