Question: Write the Pseudo code of this coding. #include #include int main(){ // file pointer FILE *ptr; // input 1 FILE *file1; file1 = fopen(matrixA-16by16.txt,r); //

Write the Pseudo code of this coding.

#include #include

int main(){ // file pointer FILE *ptr;

// input 1 FILE *file1; file1 = fopen("matrixA-16by16.txt","r");

// matrix float A[16][16];

// read all the data for(int i=0;i<16;i++){ for(int j=0;j<16;j++){ fscanf(file1,"%f",&A[i][j]); } }

// read matrix 2 // read all the data FILE *file2; file2 = fopen("vecX-16.txt","r"); float B[16][1]; for(int i=0;i<16;i++){ for(int j=0;j<1;j++){ fscanf(file2,"%f",&B[i][j]); } }

// perform multiplication float C[16][1]; int i,j,k; for(i=0;i<16;i++){ for(j=0;j<1;j++){ C[i][j] = 0; for(k=0;k<16;k++) C[i][j] += A[i][k] * B[k][j]; } }

// open file ptr = fopen("matrixA-vecX-result.txt","w"); for(int i=0;i<16;i++){ fprintf(ptr,"%f ",C[i][0]); }

fclose(file1); fclose(file2); fclose(ptr);

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!