Using functions in code has which of the following impacts?
Module 1 Quiz >>> Using functions in code has which of the following impacts >>> Functions, Methods, and Interfaces in Go
1.
Question 1
Using functions in code has which of the following impacts?
1 / 1 point
Facilitate code reuse
Support abstraction
All of the above
==============================
5.
Question 5
What is a difference between passing a slice as an argument and passing an array as an argument?
1 / 1 point
Passing a slice passes a copy of all the data in the slice.
Passing an array is faster than passing a slice.
There is no difference.
Passing an array passes a copy of the entire array.
==============================
2.
Question 2
Which of these statements is true?
1 / 1 point
A function can have only one return value.
A function cannot have more than two parameters.
A function can have parameters of different types.
The type of the arguments do not need to be specified.
==============================
3.
Question 3
Let’s say that you are writing a function which takes a structure as an argument. What is a good reason to rewrite the function to take a pointer to the structure as an argument, instead of the structure itself?
1 point
The function needs to modify the structure.
The function needs to read data inside the structure.
The function needs to copy the structure.
The structure uses very little space in memory.
==============================
4.
Question 4
Which of the features of functions listed below improve code understandability?