Given the function call matrix_addition(C, A, B), where C, A, and B are presumably 2-D matrices of 3 rows and 3 columns containing double-precision floating-point numbers, and assuming the goal is to perform matrix addition where C=A+B, the function heading for matrix_addition using void as the return type would be as follows:
This function heading indicates that matrix_addition takes three parameters, all of which are 2-D arrays (matrices) with 3 rows and 3 columns containing double-precision floating-point numbers. The matrices A and B are the matrices to be added, and the result is stored in matrix C. Since the matrices are modified and the results are stored directly in one of the parameters (matrix C), there's no need for a return value, hence the use of void as the return type.
給定函數調用matrix_addition(C, A, B),其中C, A, 和B推定為包含雙精度浮點數的3行3列2維矩陣,假設目標是執行矩陣加法,其中 C=A+B,則使用void作為返回類型的matrix_addition函數標頭如下:
此函數標頭表明matrix_addition接受三個參數,所有這些參數都是包含雙精度浮點數的3行3列的2維陣列(矩陣)。矩陣A和B是要相加的矩陣,結果存儲在矩陣C中。由於矩陣被修改且結果直接存儲在其中一個參數(矩陣C)中,因此無需返回值,因此使用void作為返回類型。