Array Definition :
Array is collection of elements of similar data types .
Passing array to function :
Array can be passed to function by two ways :
- Pass Entire array
- Pass Array element by element
1 . Pass Entire array
- Here entire array can be passed as a argument to function .
- Function gets complete access to the original array .
- While passing entire array Address of first element is passed to function , any changes made inside function , directly affects the Original value .
- Function Passing method : "Pass by Address"
2 . Pass Array element by element
- Here individual elements are passed to function as argument.
- Duplicate carbon copy of Original variable is passed to function .
- So any changes made inside function does not affects the original value.
- Function doesn't get complete access to the original array element.
- Function passing method is "Pass by Value"
0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email