All language subtitles for 11. toLower Function in C - Implementation

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

What is going on, guys?

And in this video, I actually actually I think this video should be split up into two parts, OK?

The first part should be in this video.

In the second part should be in the next video.

So basically, what should these exercises be all about?

So we are going to write a simple function that is called to lower, OK, so functioning is going to

be to lower and these function.

All it has to do is just, first of all, to receive a character.

So you know how these can be done.

Right.

And what function can receive a character in.

Once you do receive a character, you have to check if this character you just received.

OK, this character is a capital letter in English, OK, capital letter in uppercase, let's say if

it's in uppercase uppercase letter, which means all of the letters from A, B and so on out to Capital

Z.

Right.

If that's the case, then the function, what it has to do is to return the lowercase, the lowercase

representation of this letter, the lowercase letter.

OK, so in this case it should return.

Either it's a if it was in upper case, A either is B, either it's C and so on.

OK.

So basically you got the idea right.

That awesome.

OK, so that's what do you have to do.

And if the character is not an upper case, meaning that the result of this condition is false, then

the function should simply return, let's say otherwise return.

Minus one.

OK, so that's basically our function for now, I hope that's clear, simply a function called to lower

receives a character checks.

If this character is an uppercase letter, if that's the case, we return the lowercase representation

of this letter.

Otherwise, if the character was not in uppercase, then we will simply return minus one.

So that's our function for today.

OK, so let's start.

And first of all, what we have to think about is what will be the type of this function?

So we know that we have to return the character.

So probably chances are high that we need to return it of type char.

So Char and let's call this function to lower as we were requested, that unspecified char and let's

call this letter.

OK, and now the body of the function should be something like that.

We have to somehow to be able to distinguish if a letter is a capital letter, is an uppercase letter

or.

So we know that if we have taken a look at the ASCII table, then all of the letters which are from

A to Z, OK, from capital A. to to Capital Z, from uppercase to uppercase, that they are all kind

of in a sequence or there all comes after one another.

So if we will ask if a letter is greater or equal to a two to upper Casey and also if this letter is

less than or equal to Capital Z.

OK.

So if that's the case, meaning it can be all the letter from A B up to Z.

OK, this is the range.

It can be.

Then in this case, we should return this letter.

OK, in the lowercase representation.

So meaningless right down here.

One example.

So let's go like examples.

And basically if you received a letter like that K then what you should return is just K if you receive

the letter like B then you should return B and if you receive it, I don't know some letter like this

for then you should return simply minus one.

OK, so how basically if you know the representation of the letter itself, if it's an uppercase, how

can you calculate and return the lowercase representation.

And that's something that we have basically to understand about the ASCII table, which we have to do

is just to take the letter.

OK, so what we will do is like to return, OK, return and what should we return?

We should return the letter itself.

It has some numerical representation, right.

Although it's a character and we will reduce the value of an uppercase A..

OK, so this has some numerical representation and also a letter has and basically if you take a letter

and you do minus the the lower the upper case A, you will receive some number either, which will be

one, two or three or four or five, six, I don't know, up until 26, if I'm not mistaken.

And once you do so, you will receive here just some, let's say, integer number and you want to return

the lowercase representation.

So in this case, you will take plus and you will add a lower case, a lowercase eight.

So why is this so useful?

You know, that if you had a letter, let's say I don't know.

See.

OK, so if the letter was capital C and you took the letter and you reduced A from it, so you received

basically two probably.

Right.

You'd say, yeah, it's it will be too, like the the numerical representation of C minus the American

representation of A which is behind the scenes simply simply C equals two if I'm not mistaken.

Forty three and a capital eight is forty one.

Right.

Forty one capital A's were presented as forty one.

Then you will have here two OK.

And then you will take two and you added to the lower.

Case eight, which in this case, I'm sorry, sir, it's not 43, it's 65 and capital and it's 67 and

capital, a little upper case, a sixty five.

Then in this case, also, it still will be two.

OK, so let's have a minus.

Uppercase is two plus A and A is ninety seven.

Then you will receive 99, which is the decimal representation of a lower case.

C OK guys, so you see what we are doing here.

Is that clear to you.

So that's basically how you take these kind of formula, how you take OK and you simply calculate from,

from the uppercase character representation to the lower case representation.

OK.

And of course the Eltis return to minus one.

So I know that's not the most trivial exercise, but that's the basis and the basic representation and

usage of the ASCII table.

So please, guys, let me know if you still have any questions.

Feel free to ask it.

Maybe I will try to clarify it even further.

And yeah, don't worry, it's not so complicated in the next video.

We are going also to practice this even further.

So thank you so much for watching and I'll see you then.

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