Question
C Programming I have problems understanding the outcome of this question. Can someone please explain? Thanks! Suppose we have defined int numbs[100][100]; and store in
C Programming
I have problems understanding the outcome of this question. Can someone please explain? Thanks!
Suppose we have defined int numbs[100][100];
and store in each cell the sum of the two indexes, for example numbs[12][26] would have 38.
Now assume we map numbs into a 1 dimensional new array new_numbs which also has 10,000 integer variables in such a way that each cell in new_numbs has the same contents as the corresponding cell in numbs. What is printed?
I have said that new_numbs[0] stores 0, new_numbs[1]=1 ... new_numbs[9]=9, new_numbs[10]=1, new_numbs[19]=10, new_numbs[20]=2 and so on.
The answer, however, is:
67
0
84
84
2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started