Friday, October 12, 2018

compare and contrast return types and parameters

In 3-4 complete sentences, compare and contrast return types and parameters. What are each used for? How many can you have of each? Provide code examples to explain what each does.
 Return types depend on different types of code because you need some certain return types for some code to work. void returns nothing, bool is used for codes that require a yes or no answer, int is a number with no decimal, double is for numbers with a decimal, string is for for whole word answer and finally char is for one letter inputs. The parameter just like the return type depends on the type of code you are writing. It might contain on of those variable types and it could take multiple parameters.

No comments:

Post a Comment