[ back to toc ]

arrays

Date: 2002/02/16 12:10

Q:
hi mr.peter;
can you tell me how to print an array in a table?
i mean just to show me an example of the function
because i can print an array but not in a table!
please help..
A:
What do you mean a table? If this is a two dimensional array then you can
have nested loops:

for( i=0 ; i < n ; i++ )
for( j=0; j < m ; j++ )
printf("a[%d,%d]=%d\n",i,j,a[i][j]);

Is it want you wanted?

Regards,
Peter

*******************
Please take your time and rate me at AllExperts.com
I ask you to do that the way you believe I deserve.
This is a feedback that I get from allexperts but
it does not affect my life in any financial way. This
is just a mental feedback.

In case you think my answer was really good and if you feel
it appropriate do not hesitate to nominate me to volunteer
of the month.

I do this job volunteer in my free time and this is all I get
as compensation.

[ back to toc ]