274 views

1 Answer

Best answer
1 votes
1 votes
It entirely depends on the programming language. Supposing C, any array is passed as a pointer to its base address and this pointer is passed by "value". i.e., inside the called function we can use the parameter value to point to anything else. But if we dereference the pointer, we can get/modify the array elements. Some books call this as "pass by pointer" but this is certainly not "pass by reference".
selected by

Related questions

0 votes
0 votes
0 answers
1
Dknights asked Jan 7, 2023
287 views
0 votes
0 votes
0 answers
2
abhinowKatore asked Dec 5, 2022
649 views
What will be the return value of the below function, if it is called a sample(4)? int sample(int x){ if( x == 0 || x ==2) return 1; return (sample( x) * (x ));}
–4 votes
–4 votes
2 answers
3
Souvik33 asked Oct 27, 2022
663 views
*MSQ*The following figure depicts a a. A tree and only treeb. A tree with 3 nodesc. A graph (Since every tree is a graph)d. A graph and only graph
0 votes
0 votes
0 answers
4