1 discuss at least three advantages of using functions over the case in which all yo 5346551

1. Discuss at least three advantages of using functions over the case in which all your code is written inside main(). Are there some disadvantages of using functions?

2. Explain thoroughly the function calling mechanism. In other words, what happens when a calling function calls another function (the called function) and what happens when the called function finishes its task?

3. The way a calling function communicates parameters to the called function is termed parameter passing mechanism. Discuss in details the two major passing mechanisms used by C++. Provide example of the use of each one. Make sure that your answer identifies the advantages and disadvantages of each mechanism along with when should we use each?

4. Which passing mechanism is used to pass arrays to a function? Justify your answer. Can an array be use as a return value of a function? Explain.

5. Expound each of the following:

The life time of variables (static, automatic, etc.)

Rules determining which variable is accessible in a block

Global variables and their pros and cons.

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now