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

Database design, Build a database application for a sports league. Assume y...

Build a database application for a sports league. Assume your application is to keep track of teams and equipment that is checked out to teams. Explain the steps that is needed and

Central processing unit, Central Processing Unit: A Central Processing...

Central Processing Unit: A Central Processing Unit (CPU) in a computer system is an extremely fast device as compared to the main memory, but it can not work on its own. It de

Problem occurs during pipelining , While pipelining can cruelly cut the tim...

While pipelining can cruelly cut the time taken to execute a program, there are troubles that cause it to not work as well as it possibly shall. The three stages of the instruction

Technology partnerships, Technology Partnerships: Such agreements prov...

Technology Partnerships: Such agreements provide the consumer un-limited access to vendor's technology. Such contracts are typically multi-year in nature where the consumer pa

Uninformed search strategies, Uninformed Search Strategies: To be able ...

Uninformed Search Strategies: To be able to undertake a regular search, our entire agent ought to know is the starting state, the possible operators and how to check whether th

Input and output device, Input and Output device: After having underst...

Input and Output device: After having understood the characteristics relating to CPU and storage media, let us try to learn about I/O aspects of a computer system. Input /outp

Assignment - concept of programming language , Assignment :  It is compose...

Assignment :  It is composed of variable name, an assignment operator of the language and a value or variable or some expression as per composition allowed based on rules defined

C, programm for fibonacci series

programm for fibonacci series

Quiz for your learning activity, The development of your learning module is...

The development of your learning module is very time consuming, so it is recommended that you begin creating your learning module during this first week. Before you begin, download

Describe gamma and its importance, Question 1 Describe HSV and CMYK color ...

Question 1 Describe HSV and CMYK color models Question 2 Describe gamma and its importance Question 3 What are the steps involved in image manipulation? Que

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