Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Linear Algebra and the C Language/a0ek

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

__NOTOC__ Install and compile this file in your working directory. /* ------------------------------------ */ /* Save as : c00a.c */ /* ------------------------------------ */ #include "v_a.h" /* ------------------------------------ */ int main(void) { double **A = i_mR(R3,C5); clrscrn(); printf(" Math : A[%d][%d]:",rsize_R(A),csize_R(A)); p_mR(A, S4,P0,C7); printf(" C language : A[%d][%d]:\n",rsize_R(A),csize_R(A)); pall_mR(A, S4,P0,C7); stop(); f_mR(A); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ The pall_mR(); function shows the internal structure of the matrix. The columns have an index. On the left you have the size of the matrix. Four rows with the row zero and six columns with the column zero. Screen output example: Math : A[3][5]: +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 C language : A[3][5]: +4 +1 +2 +3 +4 +5 +6 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 Press return to continue.