answersLogoWhite

0


Best Answer

In order to make a large program more manageable, it is convenient to identify and isolate specific tasks that a program performs and to separate out those tasks into functions. These functions are used/invoked as needed by the main part of the program. They can also be invoked by other functions. Often a program will perform the same task in different parts of the program. Using a function to perform the task and invoking the function from the different parts of the program means that only one copy of the code is needed. This helps reduce the size of the program.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why you divide a program into functions?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What happens when you divide linear functions?

It depends on what you divide them by!


What is modular structured programming?

when you divide a long program or problem into small small understandable parts that means modular structured programming. In the consequences of c programming modular structured programming called to divide a long program into small small, and easy to understand functions. Garcha UFV, Canada


The menu bar provides access to a program's functions through?

Commands provide access to a program's functions.


The max number of functions you have used in a c program?

There is no limit to the number of functions you can have in a program. The only practical limit is dependant upon the amount of memory you have available in order to load the compiled program, whether it has 4 functions or 4 trillion functions. If the program makes use of dynamic libraries, then the amount of available memory reduces accordingly.


What is the importance of functions in a c plus plus program?

Functions are very important in C++, as you can't write the simplest program to print hello without using a function. Overall you can say that function are building blocks of a C++ program. Functions can also be defined by the programmer to reduce program size.


What is the importance of using functions in a c program?

C programs do not function without functions.


What are three functions of information systems?

Sum average divide


What is microsoft's application program that functions as an email program and a personal information manager?

outlook


What is the difference built in functions and user defined functions?

There are two types of functions in C++: Built-in or standard Library Function User defined function BUILT-IN FUNTION Built-in function which are also called Standard Library Functions are the functions provided by the C++ and we do not have to write them. These functions are included in the Header Files They are mostly written at the start of the Program They cannot be changed. EXAMPLE: conio.h; clrscrn; , etc. USER-DEFINED FUNCTION A user-defined function is a function defined by the programmer. It allows the programmer to write their own function. It allows the programmer to divide the program in many parts, which makes it easy for the programmer to rectify or modify the program; as it is easy to locate & jump to any part of the program. A programmer can write groups code to perform a specific task and that group of code is given a name (identifier).


How can employees support the hazard analysis countermeasures functions of the army safety program?

How can employees directly support Hazard Analysis and countermeasures functions of the Army Safety Program


How do you write a program in C using the fprint and fscan functions?

By using those two functions in your code.


How can employees directly support Hazard Analysis and countermeasures functions of the Army Safety Program?

How can employees directly support Hazard Analysis and countermeasures functions of the Army Safety Program