answersLogoWhite

0


Best Answer

Passing a single value to a function is often just a simple integer. But passing an array, character string or other data structure is typically "pass by reference", or in other words, the calling statement will 'point to' the place in memory where the data structure resides.
When a function is called using a pointer to a data structure, both the calling environment and the called function are referencing the same data; any changes made to the data in the structure by the function will have changed the data that the original calling environment sees.
However, when a value is passed to a function, the function creates it's own copy of the value, and can change it in any way without changing the original value.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between passing an array and passing single value data to a function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How are functions different from relations that are not functions?

In mathematics the difference between a function and a relation is that each X-value in a function only has a single Y-value.


What is the difference between multichannel and multidimensional signals?

if a signal is a function of single independent variable,then signal is called multichannel signal. if a signal is function of multiple independent variable then signal is called multidimensional signal.


What is the difference between single plate clutch and multi plate clutch?

"What is the difference between single plate clutch and multi plate clutch?"


What is the difference between a single board computer and a microcontroller?

The difference between a single board computer and microcontroller is that a single board lacks a general purpose interface and the mass storage devices.


What is the difference between the contour and magnitude of single nerve fiber and nerve trunk?

What is the difference between the contour and magnitude of single nerve fiber and nerve trunk?


Is there a difference between three phase and single phase electrical supplies?

Yes, there a difference between three phase and single phase electrical supply services.


Difference between single-point cutting tool use in lathe and shaping machine?

explain the difference between single point & multi point cutting tool


What is the single biggest difference between product and selling concepts?

what is the difference between concept selling and product selling?


What is the difference between Bachelor and Baccalaureate?

A bachelor is a single man and a baccalaureate is a single woman


What is different between double layer media and a single layer media?

difference between single layer and double winding


What is the difference between infinite electric flux and finite electric flux?

the difference between lightning and a single cell battery


What is the difference between single cell and double cell blinds?

No