Question: write a c program that declares a 2 - d integer array with 4 rows and 4 columns.the program keeps reading integer numbers from the

write a c program that declares a 2-d integer array with 4 rows and 4 columns.the program keeps reading integer numbers from the keyboard until the array is filled by only the numbers that are positive and have 1 to 4 digits.Such that, the first 4 single-digit numbers are stored in the first row and the program prints row1 full for any additional single-digit number. The first 4 two-digit numbers are stored in the second row and the program prints row2 full for any additional two-digit number. The first 4 three-digit numbers are stored in the third row. and the program prints row3 full for any additional three-digit number. The first 4 four-digit numbers are stored in the last row and the program prints row4 full for any additional single-digit number. After that, the program prints stopped and 1)print the array row by row2)print the elements on the main diagonal.Hint: single-digit numbers are from 0 to 9, two-digit numbers are from 10-99, three digits numbers are from 100 to 999,four-digit numbers from 1000 to 9999 sample input: 12345610203040501002003004005001000200030004000sample output:row1 fullrow1 fullrow2 fullrow3 fullstopped12341020304010020030040010002000300040001203004000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!