 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can read and print 3D array in C programming. Before starting, you can note how you can search my YouTube channel. You can type my name Sanjay Gupta in YouTube search bar. My channel will be available there. You can open it and you can watch various programming related videos and playlists there. You can also download my programming app Tecimus which is available on Google Play. Now I am going to implement a code with the help of C programming, which will demonstrate you how you can read and print 3D array in C programming. So first I am including a header file that is a 3D array. Now I am going to define main function. Inside main function, I am declaring a 3D array whose dimension is 2 into 3 into 3. So 3D array is basically a collection of 2D arrays. So here you can see first subscript is containing 2 that is representing number of 2D array. Second subscript is representing number of rows in each 2D array. And third subscript is representing number of columns in each 2D array. So here 2 2D arrays will be created of 3 by 3 dimensions. Now to read elements from user, I am printing this message enter elements. Now I am applying for loop i equals to 0 i less than 2 i plus plus then j equals to 0 j less than 3 j plus plus and then k equals to 0 k less than 3 and k plus plus. Now inside this k loop I have to read elements from user. So this notation will be required m percent a of i j and k. So this way elements of 3D array will be received from user. Now here I can print a message enter elements of percent d 2D array and i plus 1. So initially i is 0. So this printf will print enter elements of first 2D array. Through this j and k elements of first 2D array will be received from user. After completion of j and k, i will be incremented then its value will be 1. So the message will be displayed enter elements of second 2D array and then second 2D array will be received through j and k loops. So this way 2D array will be received from the user with the help of these 3 loops. Now I have to display output on console. So I am just copying these instructions and I have pasted them. For printing 3D array I have to execute these 3 loops. So first common message will be displayed through printf you entered. So this message will be displayed. Now with help of this i loop I can print the message elements of percent d 2D array. So this percent d will be replaced through i plus 1. So the message will be displayed elements of first 2D array. Now j and k will be printing elements on console and here in place of scanf I am using printf and I am removing ampersand and I am providing space with percent d. After completion of k I can apply a slash n for line change. So this way all the elements will be displayed on console and then return 0. So this is the complete program which will read 3D array from user and it will be displayed on output screen. So here you can see the message enter elements is displayed. Then enter elements of first 2D array. So I have to enter 9 elements for first 2D array. So this way I have entered elements of first 2D array. Now I have to enter elements of second 2D array. Again 9 elements are required. So I entered 9 elements. Now here you can see the output elements of first 2D array are 111 and then 111, 111. So 9 elements are displayed and again 9 elements for second 2D array is displayed. So this way these two 2D arrays are collectively displaying a 3D array. If you want to shift these 111 and 222 in new line then you have to place slash n here. So sorry you have to place slash n in this printing statement so that output can be displayed from new line every time. So this way I have demonstrated you how you can read and print elements of 3D array in C programming. I hope you have understood the working of 3D array. If you want to watch more programming related videos you can search my name Sanjay Gupta in YouTube. My channel will be available there. You can watch various programming related videos there. Thank you for watching this video.