Skip to main content

Search This Blog

matrix multiplication in c using functions and pointers

 #include <stdio.h> #define ROWS 3 #define COLS 3 void matrixMultiply(int *mat1, int *mat2, int *result, int rows1, int cols1, int cols2) {     int i, j, k;     // Multiplying matrices     for (i = 0; i < rows1; i++) {         for (j = 0; j < cols2; j++) {             *(result + i * cols2 + j) = 0;             for (k = 0; k < cols1; k++) {                 *(result + i * cols2 + j) += *(mat1 + i * cols1 + k) * *(mat2 + k * cols2 + j);             }         }     } } void displayMatrix(int *mat, int rows, int cols) {     int i, j;     // Displaying matrix     for (i = 0; i < rows; i++) {         for (j = 0; j < cols; j++) {             printf("%d\t", *(mat + i * cols + j)); ...

BCA IGNOU


BCA 4th

1. BCS-040 Statistical Techniques Chick Me
2. MCS-024 Object Oriented Technologies and Java Programming Chick Me
3. BCS-041 Fundamentals of Computer Networks Chick Me
4. BCS-042 Introduction to Algorithm Design Chick Me
5. MCSL-016 Internet Concepts and Web Design Chick Me
6. BCSL-043 JAVA LAB Chick Me
7. BCSL-044 Statistical Techniques Lab Chick Me
8. BCSL-045 Algorithm Design Lab Chick Me

Comments

  1. sir pls make a bcsl 057

    ReplyDelete
  2. ok next sem all question paper solve update ho jayga

    ReplyDelete

Post a Comment

Contact Form

Name

Email *

Message *