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/a0jc

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" /* ------------------------------------ */ /* ------------------------------------ */ double **X_c_r_reverse_order_mR( double **U, double **V ) { int c; for(c=C1; c<U[C_SIZE][C0]; c++) V[R1][csize_R(V)+C1-c] = U[R1][c]; return(V); } /* ------------------------------------ */ /* ------------------------------------ */ void fun(int c) { double **U = r_mR(i_mR(R1,c),9); double **V = i_mR(R1,c) ; clrscrn(); printf(" U:"); p_mR(U, S4,P0,C10); printf(" V: Copy U in reverse order :"); p_mR(c_r_reverse_order_mR(U,V), S4,P0,C10); f_mR(U); f_mR(V); } /* ------------------------------------ */ int main(void) { time_t t; srand(time(&t)); do fun(C5); while(stop_w()); return 0; } /* ------------------------------------ */ /* ------------------------------------ */ Copy the row vector U in reverse order. Screen output example: U: +2 +3 +9 +8 +5 V: Copy U in reverse order : +5 +8 +9 +3 +2 Press return to continue Press X return to stop