 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can multiply two matrix by passing 2D array into function. Before starting, you can note my information, you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tech school. You can download my programming app tech image, which is available on Google Play. Here you can see I have implemented some code in front of you, which includes header file. Then I have declared a function that is MUL. It will receive two arguments as 2D array of integer type and its written type is void. Then inside main function, I have declared two 2D arrays A and B and two variables I, J. Then printf will display the message and enter false matrix. To read false matrix I have used nested loops I and J. I will be providing row indexes and J will be providing column indexes. Then with the help of scanf, I will be receiving the elements which I want to store in A matrix. Now to receive elements for B matrix, I am copying these statements and I am pasting them. Now in printf, I can write enter second matrix, loops are same and instead of A, I am using B. So with this way both the matrix A and B will be received from the user. Now I am calling the function multiply and I am passing two 2D arrays A and B into it. So this statement is function calling and at last I am using return 0. So this is the complete implementation of main function. Now I am defining the function for multiplication of two matrix. So this function is receiving two arguments as 2D array. Inside this function, I have to implement the definition. So this is function definition. Here I am declaring another 2D array that is C. Then some variables I, J and K. So I am implementing nested loops again here. So I and J loops. Now I am initializing C, I, J with 0. After that I am starting another loop that is K. It will also repeat three times. So this is the formation of nested loop. Inside I, nested loop is J. Inside J, nested loop is K. Now here I can write C, I, J equals to C, I, J plus A, I, K multiplied by B, K, J. So this is the logic for matrix multiplication. Here element of A, I, K position will be multiplied with B, K, J position and the result will be assigned into C, I, J. So after completion of these loops, all the elements which are available in A and B matrix will be multiplied and the result will be stored inside C matrix. Now I have to print the result of C matrix. So for that purpose, I am printing a message through printf. The result is this message will be displayed and then I am implementing nested loops which will print the content of C matrix on console. This is printf statement and after completion of J, I am printing slash N so that elements can be printed in matrix form. So this is the complete implementation of the program where I have passed two 2D arrays into the function and then multiplication operation is applied and then the result is displayed. So now I am executing this code. Sorry, I have used A here instead of B. So I am placing B here. Again, I am executing this code. So now I am entering the values. So I have entered one in first matrix again in second matrix, I am entering one. Now the multiplication of both the matrix will be three at each location of third matrix. So you can see the result. Result is three at all locations of third matrix. So if you multiply mathematically these two matrix which are containing one as value, the resultant matrix will be containing three at each location. So I hope you have understood how I have calculated matrix multiplication by passing 2D array into function. If you want to watch more programming related videos, you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tax school. You can download my programming app Techimus which is available on Google Play. Thank you for watching this video.