I am revising for a C programming exam and encountered this phrase in one of the questions that I don't quite understand. The picture below describes the question. What does it mean by "matrices are passed to it as pointers to type double"? Does it mean that the arguments a, b and c are pointers type double i.e., would it then be multiply(double *a[], double *b[], double *c[], int n)
?
Asked
Active
Viewed 23 times
0

0___________
- 60,014
- 4
- 34
- 74

Ahmad Dzafran
- 1
- 2
-
@0___________ - The answers in the link posted are not adequate for showing how to declare and define initializer/assignments for `pointer to double array` variables specific to the question's description. This should be re-opened unless there is a more relevant duplicate link. – ryyker Jan 18 '22 at 18:53
-
My first comment, I believe is true in that the duplicate offered is not sufficient, but the question as is does not show much effort in attempting answer the question beyond showing your proposed prototype, and would have been closed soon for that reason anyway. ( btw `void multiply(double *a[], double *b[], double *c[], int n)` can be used. ) Suggest trying to create that function, then attempt to use it, and then, if necessary, edit your question to ask any questions about things that went wrong. – ryyker Jan 18 '22 at 19:10