Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,600 --> 00:00:04,700
All right, welcome to our amazing programming course.
2
00:00:04,880 --> 00:00:11,270
In this video, we are going to talk about something new that we probably haven't spoken of so far.
3
00:00:11,840 --> 00:00:14,980
And this topic is called Unions'.
4
00:00:14,990 --> 00:00:17,740
OK, not only guns, but unions.
5
00:00:18,350 --> 00:00:25,850
We are going to talk about what are unions, how they should be used, how to create unions, how to
6
00:00:25,850 --> 00:00:34,040
access its members, and basically a lot of things that cover this topic to the fullest.
7
00:00:34,910 --> 00:00:42,020
And the reason as to why I'm talking about unions just now is because they are usually being taught
8
00:00:42,020 --> 00:00:48,040
together or at least one after the other with the structures topic.
9
00:00:48,740 --> 00:00:51,050
That's because they are quite similar.
10
00:00:51,050 --> 00:00:57,110
But still, of course, there are differences which will be discussed in this section.
11
00:00:58,430 --> 00:01:06,200
So there is a couple of useful situations where unions can and should be used, especially for those
12
00:01:06,200 --> 00:01:14,330
of you guys who are planning to proceed even further with your career and to work in the embedded industry.
13
00:01:14,380 --> 00:01:22,160
OK, so simply saying it may come really handy when you are going to work with memory mapped registers
14
00:01:22,310 --> 00:01:25,130
to communicate with different peripherals.
15
00:01:25,730 --> 00:01:27,130
But more on that.
16
00:01:27,140 --> 00:01:28,450
Not at the moment.
17
00:01:28,460 --> 00:01:29,420
Not right now.
18
00:01:29,780 --> 00:01:36,730
For now, we'll just focus on understanding the basics and the usage of unions.
19
00:01:37,220 --> 00:01:37,910
Awesome.
20
00:01:39,180 --> 00:01:46,530
So basically saying, what is a union, OK, so that's the first question, what is a union?
21
00:01:46,710 --> 00:01:47,770
What is the union?
22
00:01:48,690 --> 00:01:53,550
First of all, a union is a user defined data type of game.
23
00:01:53,580 --> 00:01:56,550
So first of all, that's some user defined.
24
00:01:56,710 --> 00:01:58,060
OK, let's do it like this.
25
00:01:58,230 --> 00:02:03,480
First of all, that's a user defined data type.
26
00:02:03,720 --> 00:02:11,860
OK, and we already know basically what it means are similar to how we defined the structures.
27
00:02:12,510 --> 00:02:21,270
Second, what we can also say about unions is that it's basically it's basically a collection of elements
28
00:02:21,270 --> 00:02:25,770
of variables that may be also of different types.
29
00:02:26,280 --> 00:02:31,740
And they are kind of being held in the same region in the memory.
30
00:02:31,800 --> 00:02:42,240
OK, so the second phrase will be like a SADE'S or basically a collection of elements or variables or
31
00:02:42,750 --> 00:02:43,710
variables.
32
00:02:43,710 --> 00:02:44,040
Right.
33
00:02:44,280 --> 00:02:57,720
Variables that are kind of being held kind kind of being held in the same region in the memory.
34
00:02:58,040 --> 00:02:59,500
OK, and that's very important.
35
00:02:59,520 --> 00:03:08,250
We will talk about it in more depth because the second the second answer to what is a union is very,
36
00:03:08,250 --> 00:03:09,720
very important.
37
00:03:09,720 --> 00:03:18,060
And it will be like it will be with us for most of these video and for most of the discussion about
38
00:03:18,060 --> 00:03:18,810
unions.
39
00:03:18,840 --> 00:03:20,630
OK, so don't worry about that.
40
00:03:20,640 --> 00:03:27,480
We will cover also this part and we'll also talk about what is how to use unions, how to create them.
41
00:03:27,480 --> 00:03:34,460
And also we will talk about the differences between unions and structures as well as their similarities.
42
00:03:35,880 --> 00:03:42,930
And before we proceed, basically, if you will, take a look at this answer, what is the union?
43
00:03:42,930 --> 00:03:43,630
Of course.
44
00:03:43,650 --> 00:03:52,130
There are also other explanations that can be used for unions, but I think that's enough for the start.
45
00:03:52,140 --> 00:03:54,380
Okay, that's enough to get ourselves started.
46
00:03:55,530 --> 00:04:03,020
And yeah, that's basically all about it for the general introduction for unions straight and for and
47
00:04:03,090 --> 00:04:05,740
straightforward, simple and straightforward.
48
00:04:05,910 --> 00:04:08,490
And now let us proceed.
4735
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.