English, asked by Sabika69361, 8 months ago

Describes how data are shared by functions in procedure oriented programs

Answers

Answered by laxmanpawar161949
7

Answer:

In procedure oriented program many important data items are placed as global so that they can access by all the functions. Each function may have its own local data. Global data are more vulnerable to an inadvertent change by a function.

Answered by ParvezShere
3

Data sharing by functions in procedure oriented programs:

  • Procedural Oriented Programming is a programming language that follows a step-by-step approach to break down a task into a collection of variables and routines (or subroutines) through a sequence of instructions.
  • We can share data by declaring them as global variables. These can be declared in header files, which are #included in source files to gain access to the shared data variable.
  • Another way is to define a variable in a source file, then declare it extern in the other source files that use this variable. Note that the use of global variables is risky and generally frowned-upon.

#SPJ3

Similar questions