All language subtitles for 3. 2D Arrays - Element Accessing

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian Download
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

All right, so now that you know how to declare in, initialize a two dimensional array, you want to

know how to access each of its elements.

So to understand how it is done with a two dimensional array, we first need to recall how it was done

with just one dimensional array.

So suppose you had a one dimensional array that was defined as following into error of three elements

in each of them equals two and the elements equal to one, two, three.

So in this case, you should access any of the three elements within this array by just using the indexing

thing that we've learned simply to access the first element of the array.

We could just use a R at Index zero and to access the second element, we could use ARRL Index one and

so on.

We also do remember that a one dimensional array can be considered as just a row of elements and that

a two dimensional array can be considered as a grid of rows and columns or just a bunch of rows.

And if we said that a one dimensional array can be considered as just one row.

So when we access some elements, we are some element within these array, as we did previously.

We specify just the column number of these one row.

So just like we you can see here on the screen with this little nice examples.

So when we did our ARRL Index two, we told our computer to get the third element of this one dimensional

array, meaning the value add of a third column of these array.

Basically, as you probably guessed, when we want to access some element in the two dimensional array,

we need to specify also the exact row, as well as the exact column that we want to access.

And for example, let's say you had these following two dimensional array.

So its name is Matt and it has two rows, three columns, and it's basically filled in the standard

way of initializing.

And we can basically hear or see the representation of these two dimensional array.

And we can see that also we have the indexes for the rows and for the columns and it rows zero and column

one.

OK, or let's start with row zero and column zero here.

Let's use this little nice laser.

Come here.

OK, so you have here this little nice lizarazo column zero and row zero, and it gives you the value

of one.

And also you can see.

Let's move on.

What are these.

Oh, OK.

So mad at row zero and column zero.

Its value is one.

So that's how we access this element in this array.

And basically that's the whole point of how you access any of the elements in disarray.

So Matt and the index are zero one it row zero.

First of all, you specify the row and then you specify the column.

So method zero zero.

Index one zero zero.

Index one, that's how you go.

The values two, three, four or five, six doesn't really matter.

So basically you can like to access each of these elements and to do whatever you like with them.

So now let's see a couple of examples of how it will look like in code so and in the same way also can

be done for any other of the elements.

OK, so at row one and column two, you will simply go like row one column to change these value to

twelve.

And there you go.

You axis the given element, modified its value and it was changed to twelve.

And now basically that you know how to hexis each element and to change you directly, you can use it

also to your advantage and simply print the value to the screen.

Basically, you can print any of the elements of these two dimensional array using the printed function.

So here it is.

Are the changes that once you've executed each of these lines, the changes that were made inside of

these two dimensional array, and also if you would like to access into print the value.

So, first of all, you know how to access.

There is no reason why you won't be able to print.

These values, if you can access them, you can change them and you can print them.

So this is it for these video guys.

I think we've covered everything regarding the basics in the last two, three videos, the basics of

the two dimensional arrays.

It took us a little bit more than when I was planning to, but I decided to go like, you know, to

to go with you step by step, because for some reason, a lot of students are struggling with this understanding

of how to use the rows and the columns together.

They know how to use for one dimensional array, but they find it.

I don't know why they find it a little bit hard to work with two dimensional arrays.

So I decided to give it some extra time and to talk about more, more in depth about the declaration,

about the initialization, and also about how to access into print and to modify each of the two dimensional

arrays values.

So thank you for listening.

Keep on practicing and I'll see you in the next video, as always.

Have a nice day, guys.

Goodbye.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.