Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,120 --> 00:00:01,500
What is going on, guys?
2
00:00:01,500 --> 00:00:07,560
And finally, we're getting the chance to work with some real code and to make our first C program.
3
00:00:07,980 --> 00:00:10,660
I guess you are pretty excited, aren't you, at this point?
4
00:00:10,680 --> 00:00:15,540
You should already be familiar with different aspects that we've spoken of previously.
5
00:00:16,010 --> 00:00:16,900
We said there.
6
00:00:17,030 --> 00:00:20,820
There are spoken languages like English, Japanese and many others.
7
00:00:21,150 --> 00:00:25,710
But now to develop our own programs, we are going to use a programming language.
8
00:00:26,040 --> 00:00:30,100
And in these quarters, the programming language we're going to use is C.
9
00:00:30,690 --> 00:00:37,260
This simply means that the instructions are going to be written in C language with its own format and
10
00:00:37,260 --> 00:00:39,150
its own language rules.
11
00:00:39,780 --> 00:00:46,350
Just like in English, you know that every new sentence starts with a capital letter and a sentence
12
00:00:46,350 --> 00:00:47,700
may end with a dot.
13
00:00:48,180 --> 00:00:52,590
The same will be here Jast that will use a semicolon instead.
14
00:00:52,980 --> 00:00:55,200
Rules that are unique for a C language.
15
00:00:55,530 --> 00:00:56,070
All right.
16
00:00:56,430 --> 00:01:01,850
And now I want you to take a look at the default program that was created once we started the new project
17
00:01:01,850 --> 00:01:03,720
in code blocks in the previous section.
18
00:01:04,200 --> 00:01:06,120
It's pretty much the same program.
19
00:01:06,150 --> 00:01:11,130
I've just change a couple of lines in these templates, which will be easier for me to explain.
20
00:01:11,460 --> 00:01:12,840
Let's go to our code.
21
00:01:13,320 --> 00:01:18,630
So the first thing I want to talk with you guys about is this line int main.
22
00:01:19,230 --> 00:01:22,950
Basically what it means is simply specifying the entry point.
23
00:01:23,340 --> 00:01:29,340
You see, there are a lot of things written here, such as includes main return and in the future there
24
00:01:29,340 --> 00:01:31,050
will be also printing lines.
25
00:01:31,320 --> 00:01:37,260
And what we would like to do is to know from what point we should start running the real commands,
26
00:01:37,650 --> 00:01:40,700
should it be from line five or maybe from line 10.
27
00:01:41,370 --> 00:01:42,690
And what the entry point?
28
00:01:42,720 --> 00:01:50,160
What this int main means is that is just sort of a container for a block of commands and these block
29
00:01:50,160 --> 00:01:54,390
of commands is specified by these beautiful curly brackets.
30
00:01:54,780 --> 00:02:00,600
The left curly brackets specifies the beginning of the block and the right curly bracket specifies the
31
00:02:00,600 --> 00:02:00,990
end of it.
32
00:02:01,290 --> 00:02:09,550
So every time your computer sees that ain't Maine and the block of commands, it seizes as OK from here
33
00:02:09,550 --> 00:02:13,010
on, OK from right here, I will start running your commands.
34
00:02:13,410 --> 00:02:15,240
The first command will appear here.
35
00:02:15,330 --> 00:02:16,410
The second one here.
36
00:02:16,800 --> 00:02:20,190
And until I reach there, the right curly bracket.
37
00:02:20,490 --> 00:02:23,790
This is going to be the block of commands that I'm going to execute.
38
00:02:24,060 --> 00:02:26,580
So for now, for our first lesson.
39
00:02:26,580 --> 00:02:32,520
So all of your code, all of your C commands, remember that they are going to be placed under these
40
00:02:32,910 --> 00:02:34,320
in main section.
41
00:02:34,620 --> 00:02:35,250
All right.
42
00:02:35,310 --> 00:02:40,410
So also, we have these two lines include SDD, IO and include SDD Liebe.
43
00:02:40,860 --> 00:02:46,950
And what they do is that they simply allow you to include different functionalities into your program.
44
00:02:47,100 --> 00:02:51,510
For example, SDD IO stands for a standard input output.
45
00:02:51,900 --> 00:02:58,110
And basically, for now, it just gives us all the necessary functionality to work with inputs such
46
00:02:58,110 --> 00:03:03,810
as reading information from the keyboard and also to work with outputs such as displaying different
47
00:03:03,810 --> 00:03:04,770
things on the screen.
48
00:03:05,040 --> 00:03:09,670
You do remember that both the keyboard and the screen are additional parts of the computer.
49
00:03:09,690 --> 00:03:10,020
Right.
50
00:03:10,410 --> 00:03:13,680
And one is used as input and the other is this output.
51
00:03:14,100 --> 00:03:19,310
That's why we need to include the functionality of working with inputs and outputs in our program.
52
00:03:19,740 --> 00:03:23,940
So as video standard input output functionality.
53
00:03:24,150 --> 00:03:26,520
And how should we exactly use that?
54
00:03:26,820 --> 00:03:27,900
We'll see right away.
55
00:03:28,110 --> 00:03:29,480
So very good, guys.
56
00:03:29,550 --> 00:03:31,710
You see, it's not so complicated, right?
57
00:03:31,980 --> 00:03:32,400
Oh, when.
58
00:03:32,460 --> 00:03:38,700
By the way, if we're to speak about this little or return zero line, which comes as the last command
59
00:03:38,700 --> 00:03:39,570
of the main block.
60
00:03:39,930 --> 00:03:46,500
Think of it for now as just the command indicating that these program, these code has finished running
61
00:03:46,500 --> 00:03:47,310
successfully.
62
00:03:47,580 --> 00:03:55,770
Basically, when your operating system executes a program and the returned value is zero, the operating
63
00:03:55,770 --> 00:03:59,280
system can assume that the program has terminated successfully.
64
00:03:59,640 --> 00:04:01,170
But more on that later on.
65
00:04:01,470 --> 00:04:09,770
Also note that every commanding C and with a semicolon, just like sentences in most spoken languages
66
00:04:09,810 --> 00:04:15,060
and with a d'hote in C programming language commands tend to end with a semicolon.
67
00:04:15,720 --> 00:04:20,940
And that's basically all you need to know about the structure of your first C program.
68
00:04:21,210 --> 00:04:22,200
Pretty easy, right?
69
00:04:22,650 --> 00:04:25,860
I hope that everything makes sense to you in this video.
70
00:04:26,250 --> 00:04:34,170
And now we can say that is enough for the theory and we should open code blocks and create a new project.
71
00:04:34,500 --> 00:04:35,850
It's time to practice.
72
00:04:35,910 --> 00:04:37,620
Finally, some hand zone.
73
00:04:37,860 --> 00:04:38,430
Let's go.
6970
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.