Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a program to perform matrix multiplication.

Hard

Problem Statement

Write a program to perform matrix multiplication.

Sample Input

A = {{1, 2}, {3, 4}}, B = {{5, 6}, {7, 8}}

Sample Output

Result Matrix:
19 22 
43 50 

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <stdio.h> #define SIZE 2 int main() { int A[SIZE][SIZE] = {{1, 2}, {3, 4}}; int B[SIZE][SIZE] = {{5, 6}, {7, 8}}; int result[SIZE][SIZE] = {0}; // Logic for matrix multiplication return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
A = {{1, 2}, {3, 4}}, B = {{5, 6}, {7, 8}}
Expected Output
Result Matrix:
19 22 
43 50