Access over 20 million homework & study documents

9E Write a doubly nested loop in C that initializes all 50 times 50

Content type
User Generated
Rating
Showing Page:
1/2
9E Write a doubly nested loop in C that initializes all 50
times 50 elements of 2D int array table[50][50] to 123456;
use no literals (magic numbers) except 0.
Solution
Hee is the code:
#include <stdio.h>
int main()
{
double table[50][50]; // declare array of table
int i,j;
for(i = 0 ;i< 50;i++)
{
for(j=0 ; j<50;j++)
{
table[i][j] = 123456; // assign the table[i][j]
}
}
}

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/2

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
9E Write a doubly nested loop in C that initializes all 50 times 50 elements of 2D int array table[50][50] to 123456; use no literals (magic numbers) except 0. Solution Hee is the code: #include int main() { double table[50][50]; // declare array of table int i,j; for(i = 0 ;i< 50;i++) { for(j=0 ; j ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Great content here. Definitely a returning customer.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4