Friday, November 24, 2023

if an array is used as a function argument the array is passed by...........


Answer: by reference

When an array (variable) is passed as a function argument, it passes the base address of the array. The base address is the location of the first element of the array in the memory.

When a function receives the array pointer, it can then access all of the elements in the array by using pointer arithmetic and dereferencing

0 comments:

Post a Comment

Data Structures with C++



NET/SET/CS PG



Operating Systems



Computer Networks



JAVA



Design and Analysis of Algorithms



Programming in C++

Top