Computer Science, asked by mirkamruzaman7201, 1 year ago

Compare the follwing in tabular form _program and function

Answers

Answered by GB2010
1
Hiiii....

Difference is here......

A function is a subroutine or procedure that performs one or more tasks within a computer program. Functions typically perform just one task and are relatively simple, often just one or two lines of code, but some may be highly complex. Functions may call other functions, thus complex functions can be broken down into a series of very simple function calls. With well-named functions, code becomes self-documenting, minimising the need for comments that would otherwise add no value to the code and would only serve to distract the reader. Functions also help when you have repeated sections of code that may be called from a variety of other functions, thus reducing code duplication and reducing the maintenance cost; changing one function is much easier than changing all instances of the same code throughout a program.

A program is a collection of one or more functions, subroutines or procedures, the combination of which is intended to solve a particular problem. Every program has at least one function, the main function, which serves as the entry point for the application. The main function typically handles command-line input (the program's arguments) and co-ordinates calls to other functions to perform the actual processing based upon those arguments. When the main function ends, the program ends. Programs are often called executables because they contain machine code instructions that will execute as soon as the program is loaded into memory by the program loader. Programs also contain data utilised by those instructions but can also pull data from other sources. Programs can also load and execute other programs....

Hope u understand .....

@@@@@@@@@@@@@@@@##@#@@@@@

Similar questions