Saturday, June 29, 2019

Multi-Dimensional Arrays Program in C

In this article, I would like to share with you a sample program that I wrote during the time I am writing my book on the C programming language. This program will demonstrate how to declare and use multi-dimensional arrays using C programming language.

If you like my work please click the ads on my website to support my work. I will really appreciate your help. 

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com




Program Listing


/*multi_dimensional.c
 Author   : Jake R. Pomperada,MAED-IT
 Tool     : Dev C++ Version 5.11
 Date     : December 1, 2018  Saturday 7:26 AM
*/
#include<stdio.h>
int main()
{
 int tables=0, rows=0, columns=0;
 int Employees[2][2][3] = { { {5,55,555}, {8, 88, 888} }, 
                             { {1978,1971,1941}, {1984,1991,1980} }
                           }; 
 printf("\n\n");
 printf("\t\tMulti-Dimensional Arrays in C");
 printf("\n\n");
 for (tables = 0; tables < 2; tables++)
 {
   for (rows = 0; rows < 2; rows++) 
  {
    for (columns =0; columns < 3; columns++)
   {
     printf("\tEmployees[%d][%d][%d] = %d\n", tables, rows, columns,
                                 Employees[tables][rows][columns]);
   }
  }
 }
printf("\n\n");
printf("\tEnd of Program");
printf("\n\n");
}






No comments:

Post a Comment