By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,853 Members | 2,007 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,853 IT Pros & Developers. It's quick & easy.

multidimensional arrays

P: 1
In c programing,how does one print a matrix say a 4*3
Aug 8 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 10K+
P: 11,448
In c programing,how does one print a matrix say a 4*3
You have to print it row by row and every row must be printed column by column.

kind regards,

Jos
Aug 8 '07 #2

P: 4
Hi Ronds,

Here is an example which prints 4*3 matrix. Just verify

=========================
#include<stdio.h>

main ()
{
int i , j;
for (i = 0; i < 4; ++i)
{
for (j = 0; j < 3; ++j)
printf ("*");
printf("\n");
}
}
=========================

Output is like

==========
***
***
***
***
==========

Thank you.

---
Regards,
Abhilash V Nair
Aug 8 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.