Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions