Explain Why cannot arrays be passed by values to functions?
Submitted by: AdministratorBecause 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
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
Top Embedded Systems Questions
☺ | Explain What is forward reference w.r.t. pointers in c? |
☺ | Explain What is the difference between embedded systems and the system in which RTOS is running? |
☺ | Explain What happens when recursion functions are declared inline? |
☺ | Explain What are the features different in pSOS and vxWorks? |
☺ | Explain What are different qualifiers in C? |
Top PC Hardware Categories
☺ | Motherboard Interview Questions. |
☺ | Basic Computer Interview Questions. |
☺ | Embedded Systems Interview Questions. |
☺ | A + (Plus) Hardware Interview Questions. |
☺ | Computer Architecture Interview Questions. |