Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
So in this video, we are going to see water comments and how we can use them in a C programming language.
So here we have our previous exercise where we printed Alphatech, the screen.
Let's say that it's the same as the program where we printed the full name, the first name and the
last name.
Let's say that it's pretty much the same.
Alphatech is the first name and the last name.
Now we can simply add a comment that specifies in just one sentence what this program does.
For example, adding a comment like this program brings out our first and last name.
And if we would try to run this code, then we can see that it won't work.
We'll just get some errors.
And the reason for that is very simple.
We didn't specify there.
This particular line where we say that these program prints out first name and last name, that this
line is a comment.
We didn't specify that if we'll live it this way, then our computer will think of this line as some
sort of command.
We're expecting it to execute.
And that's not what we want.
All we want is to specify that this particular line is just the comment, just some sort of a note for
us and not a strict command of the computer.
So how can we do it if we would like to comment a single line in C programming language?
Then we'll just use a double slash common prefix.
All right.
Something like that.
This will indicate that these given line is not a command, but rather just common for us as the developers
and guys please know that these comments section, these comments thing is basically used in all of
the programming languages.
They adsit just sort of a concept for developing.
You may also use that in other programming languages that you may encounter in your future, such as
Python, C++, Java and any other programming language.
The only difference will be just in the way you specify the comment for each language.
So, for example, here we use the double slash prefix to specifying the comment in C language and in
other languages.
You may use a double slash while in Python you may use hash, character and so on.
All right.
So we've seen how comments are used to comment out.
Just single lines, buddy, for a comment happens to be more than just one line, which is definitely
something that can happen than we would like to use something else.
Right.
And in such a case, we would like to use a slash asterisk to start a common block, which may consist
of more than just one line of comments.
And and these common blog, by using an associated asterisk slash that will indicate there.
This is it for our common block.
So as you can see here, you may insert a lot of comment lines as part of that common block, for example,
specifying some status or whatsoever.
In this example, we specify what the program does, that it's Prince.
The full name and kind of calculate some average grade of a student.
And then we also print they add the functionalities done and maybe some status above the date and some
other information about what should be done in the future and so on.
So basically, everything that may be necessary for us or for other a developer that will S.R.O. called
in the future.
So anything that was written after this slash asterisk and before the asterisk slash should be considered
as a comment.
So think about what you want to specify in your comments during different parts of your program.
And make sure you use comments wisely, because they may save a lot of time and a lot of effort for
you in the future.
Thank you guys for watching this video.
And I'll see you in the next one by.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.