Explain Why cannot arrays be passed by values to functions?

Submitted by: Administrator
Because in C when you say the name of the array it means the address of the first element.
example :
int a[];
func (a);
int func(int a[]);

In this when you call the function by passing the argument a actually &a[0](address of first element) gets passed. Hence it is impossible to pass by value in C.
Submitted by: Administrator

Read Online Embedded Systems Job Interview Questions And Answers