All language subtitles for 2. Welcome printf() function!

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
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
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian Download
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,360 --> 00:00:06,810 All right, so now what we want our first program to do is just to print out Hailo Alphatech message 2 00:00:06,810 --> 00:00:08,010 to our screen. 3 00:00:08,460 --> 00:00:14,550 So then once we hit the wrong button, this program, this Alphatech message will be. 4 00:00:14,570 --> 00:00:15,060 Boom. 5 00:00:15,150 --> 00:00:17,040 Just print it out on our screen. 6 00:00:17,250 --> 00:00:23,410 And to do so, we will, first of all, clean everything out of here and start with a blank page, OK? 7 00:00:23,850 --> 00:00:27,700 Now, I want you to simply write the following lines of code together with me. 8 00:00:27,900 --> 00:00:35,850 First of all, we will include include the standard, the input output functionality to work program 9 00:00:35,940 --> 00:00:38,940 by including the SDD I o dot h. 10 00:00:40,020 --> 00:00:43,780 And now we have our entry point, which is aimed to Maine. 11 00:00:44,280 --> 00:00:46,050 And then we use the curly brackets. 12 00:00:46,080 --> 00:00:50,400 And here is going to here are going to be the commands of these block. 13 00:00:50,610 --> 00:00:51,060 All right. 14 00:00:51,300 --> 00:00:57,600 And the first command that we would like to use is simply a command that will take some tacks, then 15 00:00:57,720 --> 00:01:00,160 put it out on the screen as we wanted it to. 16 00:01:00,420 --> 00:01:05,430 So these command in C language is called Pareene TEF and then C language. 17 00:01:05,430 --> 00:01:11,400 And the way that we ask a computer to print out a sentence to our screen is done by using these function. 18 00:01:11,430 --> 00:01:12,720 These printed function. 19 00:01:13,110 --> 00:01:20,250 So simply saying we wanted to print a sentence of hello world or a low alphatech it would be done using 20 00:01:20,250 --> 00:01:21,930 these parentheses. 21 00:01:21,960 --> 00:01:28,410 And then all of the text that we want to be displayed on the screen will be placed under these quotation 22 00:01:28,410 --> 00:01:28,920 marks. 23 00:01:29,070 --> 00:01:33,360 For example, we can just use hello world message here. 24 00:01:33,720 --> 00:01:37,210 And at the end, we should also add a semicolon. 25 00:01:37,830 --> 00:01:41,790 And then we should also use the return zero. 26 00:01:41,850 --> 00:01:42,210 Right. 27 00:01:42,270 --> 00:01:43,950 Which we introduced previously. 28 00:01:44,190 --> 00:01:48,820 And now we can run this program, build and run, build and run. 29 00:01:49,350 --> 00:01:50,790 And then let's see what. 30 00:01:51,000 --> 00:01:52,230 Oh, here is our message. 31 00:01:52,260 --> 00:01:52,980 Hello, world. 32 00:01:53,040 --> 00:01:54,720 Just on the council application. 33 00:01:55,080 --> 00:01:58,390 Exact figures we can see in the print F Command. 34 00:01:58,470 --> 00:02:00,810 This is the text to be displayed on the screen. 35 00:02:01,260 --> 00:02:06,500 Limit aside, for now, these process return zero and Dixy and the execution time. 36 00:02:06,510 --> 00:02:07,770 We'll discuss it later on. 37 00:02:08,250 --> 00:02:10,580 But for now, that's looking good, right? 38 00:02:10,800 --> 00:02:14,730 And we were asked to print out a Hello Alphatech message. 39 00:02:14,760 --> 00:02:16,130 So let's just we. 40 00:02:16,290 --> 00:02:16,980 This one. 41 00:02:17,070 --> 00:02:19,030 Hello, Alphatech. 42 00:02:19,200 --> 00:02:20,280 As requested. 43 00:02:20,550 --> 00:02:26,520 And I just want to show you guys that it doesn't matter what text you put in these quotation marks, 44 00:02:26,520 --> 00:02:32,640 it can be Hello World, Hello, Alphatech, or whatever other text that you are going to use in the 45 00:02:32,640 --> 00:02:35,730 next challenge, as in the next exercises. 46 00:02:36,120 --> 00:02:40,230 So let's try to run and to build and run it. 47 00:02:40,720 --> 00:02:41,250 All right. 48 00:02:41,580 --> 00:02:42,740 So very go. 49 00:02:42,780 --> 00:02:43,830 Here is your message. 50 00:02:43,860 --> 00:02:44,990 Hello, Alphatech. 51 00:02:45,210 --> 00:02:46,230 Good job, guys. 52 00:02:46,260 --> 00:02:54,070 And one thing to mention here that I want to tell you is that in these quotation marks, we specify 53 00:02:54,070 --> 00:03:01,500 the exact text or Bettis or better essays string that we want to be displayed on our screen and the 54 00:03:01,500 --> 00:03:03,390 exact text in these cases. 55 00:03:03,390 --> 00:03:04,530 Hello, Alphatech. 56 00:03:04,560 --> 00:03:06,990 That appears between these quotation marks. 57 00:03:07,230 --> 00:03:09,510 And also you don't have just to use words. 58 00:03:09,510 --> 00:03:11,100 You may also use numbers. 59 00:03:11,130 --> 00:03:16,920 Let's say one, two, three, four, five, six, seven, and then press some build and run. 60 00:03:17,280 --> 00:03:22,350 And then you can see one, two, three, four, five, six, seven, just on the console application, 61 00:03:22,350 --> 00:03:23,760 as you expected. 62 00:03:23,940 --> 00:03:31,800 Also, don't forget to add this return zero thing because it simply specifies that the operating system 63 00:03:31,830 --> 00:03:34,950 that that program has terminated successfully. 64 00:03:35,130 --> 00:03:41,040 So to summarize, what we've done here is so far, we simply use the print f command, the print function 65 00:03:41,580 --> 00:03:45,510 to display some text on the console application screen. 66 00:03:45,750 --> 00:03:51,570 And that's very important to understand, because in these course, all four printed results are going 67 00:03:51,570 --> 00:03:55,290 to be seen on these console applications screen on this guy. 68 00:03:55,400 --> 00:03:58,620 OK, all of the results are going to be seen here. 69 00:03:58,620 --> 00:04:05,460 And also we'll use these console application to read information, to read some data from the user. 70 00:04:06,360 --> 00:04:08,520 But this will be the next section. 71 00:04:08,940 --> 00:04:10,120 But for now, that's okay. 72 00:04:10,170 --> 00:04:16,830 We'll just look at these console application as the place where we are going to print some text, some 73 00:04:16,830 --> 00:04:17,340 data. 74 00:04:17,460 --> 00:04:17,940 All right. 75 00:04:18,090 --> 00:04:23,060 So hopefully everything works smoothly for you so far with no unexpected bugs. 76 00:04:23,520 --> 00:04:29,040 But if you've still got some problems, stick a closer look and see if everything written as it should 77 00:04:29,040 --> 00:04:35,500 be that you didn't miss any semicolon at the end of each command, maybe parentheses, not written correctly 78 00:04:35,880 --> 00:04:38,340 or maybe something with these curly brackets. 79 00:04:38,640 --> 00:04:44,310 And if you still can find why it's not working, please stick. 80 00:04:45,360 --> 00:04:50,940 Check out the FEC, U.S., maybe somebody already asked a similar question. 81 00:04:51,870 --> 00:04:56,340 And now let's get back to the Hillo message we used previously. 82 00:04:56,800 --> 00:04:58,740 And Lo Alphatech or. 83 00:04:58,740 --> 00:04:59,190 Right. 84 00:04:59,560 --> 00:04:59,780 And. 85 00:04:59,970 --> 00:05:00,780 We run it. 86 00:05:00,810 --> 00:05:03,500 We can see in the consular application there. 87 00:05:03,960 --> 00:05:08,760 There is this additional text that we don't even know where it came from. 88 00:05:09,300 --> 00:05:15,390 This text is a default text that you're going to see a lot and you would like to keep some distance 89 00:05:15,390 --> 00:05:20,200 between these not so necessary text to your real output. 90 00:05:20,220 --> 00:05:22,170 In this case, the hello message. 91 00:05:22,370 --> 00:05:27,720 And to do so, you would like to do some sort of hitting the answer button right here. 92 00:05:28,170 --> 00:05:30,550 Just before these default text starts. 93 00:05:30,570 --> 00:05:30,930 Right. 94 00:05:31,350 --> 00:05:33,120 So you can get one line down. 95 00:05:33,630 --> 00:05:37,100 So luckily for us, we can do that programmatically. 96 00:05:37,560 --> 00:05:44,400 We can change or basically specify getting one line down by using the backslash and the backslash and 97 00:05:44,400 --> 00:05:46,980 notation within the print of command. 98 00:05:47,250 --> 00:05:48,950 So it will look something like this. 99 00:05:48,990 --> 00:05:50,780 Let's add a new line here. 100 00:05:50,790 --> 00:05:52,620 So we'll just add backslash. 101 00:05:53,260 --> 00:06:00,150 And now if we go and run and build and run, this application we've created will simply see that there 102 00:06:00,150 --> 00:06:05,790 is a new line added separating between the real text that interests us. 103 00:06:06,090 --> 00:06:09,840 Do these default information displayed on the console application. 104 00:06:10,080 --> 00:06:10,770 Great. 105 00:06:10,860 --> 00:06:17,580 And basically, you may add also these backslash and wherever you wanted it in your text. 106 00:06:17,940 --> 00:06:22,660 So, for example, you may add a backslash and right after every word in the text. 107 00:06:22,680 --> 00:06:24,290 Here in the Hello Alphatech. 108 00:06:24,810 --> 00:06:27,660 And try to print out something like this. 109 00:06:27,690 --> 00:06:29,460 Let's go this way. 110 00:06:29,640 --> 00:06:30,470 All right. 111 00:06:30,710 --> 00:06:32,380 And now we will run it. 112 00:06:32,400 --> 00:06:36,210 We will see that every word is printed in a different line. 113 00:06:36,240 --> 00:06:36,960 So here. 114 00:06:36,990 --> 00:06:38,430 Hello, Alphatech. 115 00:06:38,880 --> 00:06:45,210 And these spaces, because we just specified the backslash end right here, if we move it a little bit 116 00:06:45,240 --> 00:06:46,170 to here. 117 00:06:46,410 --> 00:06:46,680 Right. 118 00:06:46,710 --> 00:06:53,700 So we don't give it an option to start a new line with a space and backslash an off through this guy. 119 00:06:54,240 --> 00:06:54,600 All right. 120 00:06:54,630 --> 00:06:56,370 Let's try this one once again. 121 00:06:56,590 --> 00:06:57,270 And there you go. 122 00:06:57,270 --> 00:06:59,620 You can see the hello and Alphen Tech. 123 00:06:59,670 --> 00:07:03,070 Everyone is specified in in in a new line. 124 00:07:03,470 --> 00:07:04,050 Hello. 125 00:07:04,440 --> 00:07:10,950 Just by using these backslash GUI and now we can say congratulations for writing your first program. 126 00:07:11,370 --> 00:07:17,850 Now let's practice that knowledge with different cool exercises, different cool challenges that will 127 00:07:17,850 --> 00:07:19,740 help you to improve your skills. 11146

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