Subroutine and functions, Basic Computer Science

Assignment Help:

Subroutine and Functions:

 In a program, it is often necessary to repeat a statement or group of statements at several points to accomplish a particular task. Repeating the same statement in a program each time makes a program lengthy and reduces readability. These problems could be sorted out if the necessary statements could be written once and then referred to each time they are needed. This is the purpose of a subprogram. Basically there are two different types of subprograms, called functions and subroutines.  Making subprograms allows tackling small pieces of a problem individually. 

Once each piece is working correctly then the pieces are integrated together to create the complete solution of the problem. To implement functions and subroutines, we require writing the main program that references all of the subprograms in the desired order and also writing the subprograms. This can  be done in any order that is convenient. 


Related Discussions:- Subroutine and functions

Inforamtion infrastructure and services, benefit a company derive from mana...

benefit a company derive from managing it own information technology

As, access,excel and ms word/

access,excel and ms word/

Write down dijkstra''s algorithm, QUESTION (a) Write down the Update ...

QUESTION (a) Write down the Update Step in the Dijkstra's algorithm explaining its complexity. (b) Propose a Generic Algorithm for Depth-First Search Algorithm, assuming

Describe symbols chart in assembly process ?, SYMBOLS CHART Every one of t...

SYMBOLS CHART Every one of the parts on code line in assembler is known as token, for instance on the code line: MOV AX, Var We comprise three tokens, the MOV instruction, the AX o

Frequency and bandwidth, Frequency and Bandwidth: Let us try to unders...

Frequency and Bandwidth: Let us try to understand a little about how information is transmitted. The information may be in the form of sound (human voice, music) or it may be

Binary, Ask quwhat is binary estion #Minimum 100 words accepted#

Ask quwhat is binary estion #Minimum 100 words accepted#

Online searching, Online Searching: The real difference between manual...

Online Searching: The real difference between manual searching and online searching lies, according to William A. Katz, in the mechanics and the jargon of the latter. However,

What is electrical energy, the chemical reactions in a battery produce ____...

the chemical reactions in a battery produce ____________, each of which carries energy.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd