4. List three methods of passing an argument into a function and two methods of
ID: 3905312 • Letter: 4
Question
4. List three methods of passing an argument into a function and two methods of returning values. (2 points cach). i Scie 5. (5 points) Write a for loop to obtain the sum of 23, 25, 27,29, 31, and 33. The loop body must contain only a single line. If the loop body contains multiple lines, 2 points will be deducted even if your answer is correct 6. Write a function prototype (do not specify the parameter name) with the specification: (1) return a double pointer, (2) the function name is testFunction; (3) the first parameter is double and pass-by-value; (4) the second parameter is double and pass-by-reference; (5) the third parameter is double and pass-by-reference using pointer, (6) the fourth parameter is double, pass-by-reference, and the function is not allowed to modify the parameter, (7) the fifth parameter is an array of type double; (8) the eighth parameter is integer pass-by-value. (2 points each) Answer: mb“- 7. Create an integer 2-dimensional array a[10)[10] using pointer. (4 points) Answer 8. Name the three types of selection statements, three types of iteration statements, and the four O types of jump statements. (1 point each) '..f ?.ude. -wh-le d while o 4 of 4Explanation / Answer
8)Answer:
Three types of selection statements.
if statement:
if…else statement:
switch statement:
Iteration statements:
Iteration statements are most commonly know as loops. Also the repetition process in C is done by using loop control instruction. There are three types of looping statements:
?Jump statements:
The jump statements are the
goto statement,
the continue statement,
the break statement,
and the return statement
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.