All language subtitles for 6. Challenge 4 - General Function to use Input & Print of a struct

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
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, so in one of our previous challenges and practices, I've shown you this example

of how you can run some code.

And also in the previous video where we talked about typedef structures, I've shown you two examples

of using the print date function, as well as using the date input date function in.

Just a quick reminder to you, if you were not concentrated and that's very important, that you will

be concentrated and each the material every second of the course, because if you miss one thing, it's

it will be very hard to, like, fill these gap and to proceed and move on with the more more advanced

material.

So what we have done previously is that we use the time definitions, truck, date, day, date.

And we know that now every time that we are going to use the word date, it is just equivalent as we

have been using previously structured date.

So we created the structure.

Then we wrote down the print date function.

That's the name.

That's the type receiving a date D.T. and printing out the year, the month and a date values.

And also we have the second functionality responsible for all of the operations we've done here, using

the second half in print F and so on.

And the reason why the reason why we took and like, you know, you split it out the code of all of

these part to these function to date and also all of these code to the print date is because we want

to leave our main function as clean as possible and to separate the functions that are going to be like,

you know, repetitive functions to different functions.

So, for example, you know that you will use print date probably more than just once, OK?

And probably more than just for one date variable as well as you're probably also going to create more

than just one date variable in your program, in your code.

So this will be a function that is responsible for everything instead of having everything in the main

and just duplicate and duplicating the code and messing everything up.

OK, so once it's clear why we've done it and make sure you watch the previous videos, because I'm

not going step by step on these two functions, I'm going to proceed and to make some use in the main

function that will take both are will take, will utilize and take advantage of these two functions

that we just created the date and the print date.

So first of all, let's create our new date, let's say date, graduation, graduation, date.

And we just created a variable and it's not initialized.

None of its fields are initialized.

And one way to do so is to use graduate date.

Graduation date equals to input date.

And basically what will happen here is that once we reach this line, we will simply call this function

in to date.

And it is in charge of creating everything, four of these for the structure, reading the values from

the user and returning the result.

And once the result is returned, instead of using these complex print f, we will simply use print

date and specify what we want to print the graduation date.

And there you go.

So what will happen now is that if we build and run it, we will see enter a date five, six and 2021

and there you go.

You have the year, the month and the day.

Everything is working exactly as we expected.

And if for some reason you also want I don't know, like like I don't know the date of today, for example,

OK, the date today date.

So you create two variables.

OK, the first one is graduation day.

The second one is today date.

Instead of duplicating code.

What do you simply do is today date today date equals to date once again, input, input, being put,

input, date.

And if you want to printed you simply print date.

And you specify here that today date.

There you go.

See how clean the main function remains in how we utilize and take advantage of both of these functions

that we've just created, simple as their guys, instead of putting everything like, you know, like

putting all of these code for the graduation date here.

And instead of putting everything for the today date here, we simply use this function as separate

units and we work with them correctly.

So I hope.

That's clear.

That's, I think, good enough for the basics of structures, understanding how to work with them,

how to function, work with structures, accessing, reading, printing and so on.

So thank you guys for watching.

And let's move on.

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