What is a two-dimensional char array with 3 rows and 3 columns. Can give me an example of a program. Thanks
pixrix
0
Newbie Poster
Recommended Answers
Jump to PostI won't write the program for you but here is how to declare the array.
char array[3][3];
Jump to PostA real world use of two dimensional arrays is for representing matrices. Here is an example of 3 x 3 identity matrix:
int matrix[3][3] = {0}; for(int i = 0; i < 3; ++i) { for(int j = 0; j < 3; ++j) { if(i == j) …
All 5 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
pixrix
0
Newbie Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
pixrix
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.