This is for C 1 Function names should be treated similar to
This is for C++
1) Function names should be treated similar to variable names and be as long as necessary and very descriptive. True or false?
2) Functions allow us to set aside code that we can then use over and over as needed. True or false?
3) The return statement can be used in both void and value returning function. In void functions – the return simply ends the function. True or false?
4) The Golden Rule of recursion states that all Base Cases must make progress towards a Recursive Case. True or false?
5) Functions rely entirely on Global Scope variables to receive information from other scopes. True or false?
6) Void functions return a value to where the function was called and are often used for calculations. True or false?
I will rate right away. Thank you!
Solution
1) Function names should be treated similar to variable names and be as long as necessary and very descriptive. True or false?
True : function name should give the idea about purpose of function
2) Functions allow us to set aside code that we can then use over and over as needed. True or false?
True : You can any nimber of times a function
3) The return statement can be used in both void and value returning function. In void functions – the return simply ends the function. True or false?
True : if you want to return from a void function in middle, you can use \'return\' key word
4) The Golden Rule of recursion states that all Base Cases must make progress towards a Recursive Case. True or false?
False : Base cases must progress towards trmination of recursion
5) Functions rely entirely on Global Scope variables to receive information from other scopes. True or false?
True : you can pass parameters to function , those variables have scope inside function only. If you want to excess other
scope variables then they shoud be declared globally outside function
6) Void functions return a value to where the function was called and are often used for calculations. True or false?
False : void function does not return a value
