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

Explain briefly about gnome desktop, Question 1 Brief about the shells of ...

Question 1 Brief about the shells of Linux operating system Question 2 Explain briefly about GNOME desktop Question 3 Write note on the following Encryption Sig

Block diagram of computer, Input unit: These are used to read data and tran...

Input unit: These are used to read data and transfer to primary memory contained in CPU through keyboard or floppy disk or mouse etc. Central Processing Unit (CPU): This consists o

Advantages and Disadvantages of Threads over Multi processes, Advantages:- ...

Advantages:- • Sharing Treads permit the sharing of a lot resources that cannot be shared in process, for instance, sharing code section, data section, Operating System resource

Operating system, Ask question describes deadlock avoidance#Minimum 100 wor...

Ask question describes deadlock avoidance#Minimum 100 words accepted#

Understanding human intelligence in social, Understanding human intelligenc...

Understanding human intelligence in social AI can be taken as just the current tool in the philosopher's toolbox for answering of questions for the behaviour of human intellig

Differentiate between a dynamic and a static web site, QUESTION a) Diff...

QUESTION a) Differentiate between a dynamic and a static web site. b) Why are electronic mails (e-mails) preferred to the post office mails? How do they affect the modern of

C, programm for fibonacci series

programm for fibonacci series

Computers in laboratory organisation and management, Computers can be used ...

Computers can be used for better and more efficient management and organisation of laboratories. A computer like the human brain receives information, stores and processes it and t

DBMS, what is the meaning of data definition

what is the meaning of data definition

2. What benefits can a company gain by managing its , 2. What benefits can ...

2. What benefits can a company gain by managing its own information infrastructure and services?

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