Embedded Software Engineer Question:
Download Questions PDF

Please explain can structures be passed to the functions by value?


Passing structure by its value to a function is possible, but not a good programming practice. First of all, if we pass the structure by value and the function changes some of those values, then the value change is not reflected in caller function. Also, if the structure is big, then passing the structure by value means copying the whole structure to the function argument stack which can slow the program by a significant amount.

Download Embedded Software Engineer Interview Questions And Answers PDF

Previous QuestionNext Question
Explain what are the uses of the keyword static?Tell me what is the function of simple thread poll in embedded system?