Subroutine , Basic Computer Science

Assignment Help:

Subroutine:  

A subroutine  is a type of subprogram, a piece of code within a larger program that performs a specific task and is relatively independent of the remaining code.  It is also called a procedure, routine or a method.  A subroutine has no value associated with its name. All outputs are defined in terms of arguments; there may be any number of outputs. 

 In most cases, a subroutine needs some information about the circumstances in which it has been called. A procedure that performs repeated or shared tasks uses different information for each call. This information consists of variables, constants, and expressions that you pass to the procedure when you call it.

  A parameter represents a value that the procedure expects you to supply when you call it. You can create a procedure with no parameters, one parameter, or more than one. The part of the procedure definition that specifies the parameters is called the parameter list. 

 An argument represents the value you supply to a procedure parameter when you call the procedure. The calling code supplies the arguments when it calls the procedure. The part of the procedure call that specifies the arguments is called the argument list. For example here is a subroutine to find the sum of three numbers    


Related Discussions:- Subroutine

Define Function of OSI Layers, OSI Layers: Open Systems Interconnection mod...

OSI Layers: Open Systems Interconnection model is a reference model developed by International Organization for Standardization in 1984, as a conceptual structure of principles fo

Evolution of erp , Evolution of ERP  The origin of using computers for ...

Evolution of ERP  The origin of using computers for business, traces the following line of story. Originally, they were designed to support the repetitive and time consuming fu

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

System administration and linux/unix, Write a system using script written i...

Write a system using script written in asuitable scripting language to automate taking a basic linux server instance and provisioning it with particular applications based on its I

REMOTE DESKTOP, I WANT TO CONNECT A PC WIYH MY PC THROUGH REMOTE DESKTOP. W...

I WANT TO CONNECT A PC WIYH MY PC THROUGH REMOTE DESKTOP. WHAT I DO TELL ME PLEASE

Cai, what is cai

what is cai

Subroutine , Subroutine :   A subroutine  is a type of subprogram, a pi...

Subroutine :   A subroutine  is a type of subprogram, a piece of code within a larger program that performs a specific task and is relatively independent of the remaining code.

Hypertext transfer protocol (http), It's a common protocol or "language" co...

It's a common protocol or "language" computers use to "speak" to each other over the Web.

Compare cisc with risc cpus, Question 1 Define the following terms        ...

Question 1 Define the following terms                           1) Pipelining 2) Super Pipelining 3) Dynamic Execution 4) Multiprocessing 5) Multimedia Extensions Question 2

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