1
00:00:02,670 --> 00:00:04,200
Hey, guys, what's up?

2
00:00:04,500 --> 00:00:07,200
So our today's topic is typecasting.

3
00:00:07,680 --> 00:00:08,760
It is a very easy topic.

4
00:00:09,150 --> 00:00:17,030
So typecasting means cast wonder your type two other did a type that means convert one did a type to

5
00:00:17,120 --> 00:00:17,880
other, did a type.

6
00:00:18,400 --> 00:00:20,080
So typecasting is of two types.

7
00:00:21,320 --> 00:00:21,920
Implicit.

8
00:00:23,970 --> 00:00:27,450
In blizzard typecasting and explicit typecasting.

9
00:00:28,980 --> 00:00:31,890
So first of all, we were allowed implicit typecasting.

10
00:00:34,560 --> 00:00:36,060
So let's make a new file.

11
00:00:39,190 --> 00:00:40,150
Compiling an.

12
00:00:42,060 --> 00:00:43,320
OK, so let's Neamat.

13
00:00:47,520 --> 00:00:48,480
Typecasting.

14
00:00:53,440 --> 00:00:54,580
Not the CPB.

15
00:01:06,480 --> 00:01:10,050
OK, so first of all, we are talking about implicit typecasting.

16
00:01:10,860 --> 00:01:17,250
So tell me what really my output, if I do see out two plus three.

17
00:01:18,390 --> 00:01:20,100
Obviously my output will be five.

18
00:01:20,730 --> 00:01:21,270
No issue.

19
00:01:22,740 --> 00:01:24,000
But if I do.

20
00:01:27,270 --> 00:01:33,510
Ghazi GWAS character a and then I ride see old.

21
00:01:35,970 --> 00:01:37,160
C plus.

22
00:01:38,730 --> 00:01:42,470
Let's make it a C out, a plus three.

23
00:01:43,380 --> 00:01:44,550
What do you mean output?

24
00:01:46,200 --> 00:01:46,860
Let's send it.

25
00:01:51,110 --> 00:01:54,830
So my output is coming out to be handed way.

26
00:01:59,820 --> 00:02:08,850
So what happened is this Pless operator is defined for numbers and is not defined for characters.

27
00:02:09,300 --> 00:02:15,920
So what this plus operator is doing, it is converting a 2D archiving loop, which is 97.

28
00:02:16,560 --> 00:02:18,690
And then it is adding through to it.

29
00:02:19,140 --> 00:02:22,420
So 97 plus three comes out to be handed.

30
00:02:23,410 --> 00:02:25,680
Okay, so this is called typecasting.

31
00:02:26,010 --> 00:02:29,740
This character has been converted into 97.

32
00:02:30,870 --> 00:02:32,900
Okay, so we have not type gustad.

33
00:02:33,150 --> 00:02:35,220
It is done automatically by the compiler.

34
00:02:35,320 --> 00:02:36,990
That's why it is called implicit.

35
00:02:38,130 --> 00:02:41,420
Implicit means automatically type conversion.

36
00:02:41,670 --> 00:02:44,280
It is done by compiler, not by us.

37
00:02:44,700 --> 00:02:47,970
Okay, so let's see some more example of implicit typecasting.

38
00:02:52,250 --> 00:02:54,970
So instead of character here, we can also ride.

39
00:02:55,350 --> 00:02:59,570
See, because Variable C contains character only.

40
00:03:00,830 --> 00:03:10,130
Now, if I had, I'd see out characters, see so many variables, see multiplied three.

41
00:03:11,750 --> 00:03:12,440
What will happen?

42
00:03:14,660 --> 00:03:15,630
Come on, get out.

43
00:03:15,910 --> 00:03:17,490
Now let's bail an.

44
00:03:21,030 --> 00:03:22,640
So 291 is my output.

45
00:03:23,600 --> 00:03:24,590
So what is happening here?

46
00:03:25,020 --> 00:03:25,340
This.

47
00:03:26,030 --> 00:03:26,870
Just a second.

48
00:03:30,020 --> 00:03:30,620
So this.

49
00:03:32,430 --> 00:03:35,160
Multiplication operator is also defined for numbers.

50
00:03:35,220 --> 00:03:36,610
It does not define folk characters.

51
00:03:37,050 --> 00:03:39,000
So it is typecasting.

52
00:03:39,030 --> 00:03:47,380
It is converting variable C, which is holding correct that A. into its skyway is ninety 97 and 97 multiplied

53
00:03:47,400 --> 00:03:49,850
by three is coming out to be two.

54
00:03:49,850 --> 00:03:50,850
Ninety one.

55
00:03:52,110 --> 00:03:57,270
Okay, so I hope you know what is typecasting, implicit typecasting.

56
00:03:57,810 --> 00:03:59,190
So let's see some more example.

57
00:04:08,960 --> 00:04:10,520
So implicit typecasting.

58
00:04:12,560 --> 00:04:16,190
Character plus in danger is in in danger.

59
00:04:17,600 --> 00:04:17,870
OK.

60
00:04:18,260 --> 00:04:21,230
Similarly in danger, plus flawed.

61
00:04:22,330 --> 00:04:23,500
Is flawed.

62
00:04:25,450 --> 00:04:28,010
In danger, divided by a flawed.

63
00:04:29,520 --> 00:04:30,580
Is flawed.

64
00:04:32,940 --> 00:04:34,080
And similarly.

65
00:04:36,680 --> 00:04:44,270
Integer divided by integer is an integer, so typecasting means you have flawed.

66
00:04:45,340 --> 00:04:47,020
Then you have integers.

67
00:04:48,370 --> 00:04:51,070
Then you have correctors and then you have bull.

68
00:04:52,330 --> 00:04:52,610
OK?

69
00:04:52,870 --> 00:04:56,730
So cattle can be converted to endanger cattle, can be converted to float.

70
00:04:57,280 --> 00:04:59,500
And similarly, integer can be converted to flawed.

71
00:04:59,650 --> 00:05:04,240
And similarly, Boole can be converted to indicate integer or flawed.

72
00:05:05,600 --> 00:05:09,140
OK, so this is implicit typecasting you you can remember some of the rules.

73
00:05:09,570 --> 00:05:15,430
There is one moral character, plus character is an integer.

74
00:05:15,680 --> 00:05:15,940
Why?

75
00:05:16,040 --> 00:05:19,940
Because this plus operator is defined for integers.

76
00:05:20,630 --> 00:05:26,450
And so it will convert correctly into our Sky-Blue, this character towards Scaevola, and then add

77
00:05:26,450 --> 00:05:27,150
those Wickwire.

78
00:05:27,500 --> 00:05:29,450
And we will get integer as an output.

79
00:05:30,080 --> 00:05:34,080
So let's see some more examples to make things clear.

80
00:05:35,600 --> 00:05:39,440
So first of all, that we will see some more example, character Blaesing Deja.

81
00:05:42,620 --> 00:05:44,800
So how do you find Aaskov a local character?

82
00:05:45,230 --> 00:05:45,920
What we will do?

83
00:05:46,400 --> 00:05:47,980
We will write see out.

84
00:05:49,940 --> 00:05:54,290
For example, I want to find the guy really of character, a capitally.

85
00:05:54,980 --> 00:05:55,760
So what do I do?

86
00:05:56,570 --> 00:05:57,050
Capital.

87
00:05:57,080 --> 00:05:58,330
A place.

88
00:05:59,060 --> 00:05:59,510
Zero.

89
00:06:00,620 --> 00:06:02,410
Okay, so character blessin deja.

90
00:06:02,450 --> 00:06:04,640
My output will be in danger.

91
00:06:04,910 --> 00:06:06,770
So let's bail and then.

92
00:06:09,130 --> 00:06:12,740
So output is sixty five, which is the Aske I value of capitally.

93
00:06:13,420 --> 00:06:17,870
Similarly, you can find Sky-Blue in this faction of any character.

94
00:06:20,500 --> 00:06:21,880
For example, the sea out.

95
00:06:23,530 --> 00:06:27,430
Let's say I want to find does Caverly of Smally.

96
00:06:29,410 --> 00:06:30,190
So please zero.

97
00:06:38,720 --> 00:06:43,140
OK, so 65 and under, because I have not given and line here.

98
00:06:43,770 --> 00:06:49,790
So let's commander doubt and now let's run it again.

99
00:06:53,700 --> 00:06:56,750
Under this deal, I ask I really have character be.

100
00:07:01,670 --> 00:07:03,470
OK, so let's see somewhat example.

101
00:07:05,730 --> 00:07:10,530
For example, if I do get AVC Edge.

102
00:07:13,100 --> 00:07:14,060
It quotes.

103
00:07:17,470 --> 00:07:18,240
Capital A..

104
00:07:19,210 --> 00:07:21,430
And then I am printing C out.

105
00:07:22,090 --> 00:07:24,580
C, H plus one.

106
00:07:25,390 --> 00:07:26,910
So obviously my answer will be.

107
00:07:30,290 --> 00:07:34,010
And line, so hours, I will be 66.

108
00:07:34,200 --> 00:07:35,010
OK, so look.

109
00:07:35,070 --> 00:07:40,400
Ask a value of character is 65 and Pleasant's amount will be 66.

110
00:07:44,910 --> 00:07:46,680
66 is getting printed.

111
00:07:47,580 --> 00:07:48,660
Now, what if I do?

112
00:07:51,320 --> 00:07:53,040
S.H. equals.

113
00:07:54,440 --> 00:07:56,330
S.H. plus one.

114
00:07:57,500 --> 00:08:00,980
And then we are printing CIJ.

115
00:08:02,850 --> 00:08:04,140
So what will be my output?

116
00:08:04,650 --> 00:08:05,910
Let's come into doubt also.

117
00:08:06,990 --> 00:08:08,310
So what will be my output?

118
00:08:09,660 --> 00:08:10,970
OK, so let's run it.

119
00:08:16,590 --> 00:08:20,080
So Capital B is getting rendered midway.

120
00:08:21,930 --> 00:08:22,760
So let's see.

121
00:08:27,200 --> 00:08:31,640
So in this case, my output was 65, sorry, 66.

122
00:08:32,150 --> 00:08:33,110
And in this case.

123
00:08:34,300 --> 00:08:35,030
My out for this.

124
00:08:35,050 --> 00:08:35,780
Capital B..

125
00:08:37,090 --> 00:08:40,570
So in this case, what happened is when you write C out.

126
00:08:42,230 --> 00:08:48,320
S.H. plus one, so the value of S.H. was sixty five and then you are adding one.

127
00:08:48,440 --> 00:08:50,120
So the output was 66.

128
00:08:50,810 --> 00:08:51,750
I already told you.

129
00:08:51,770 --> 00:08:55,250
Character plus integer is an integer.

130
00:08:56,900 --> 00:08:58,910
This is implicit typecasting.

131
00:09:00,570 --> 00:09:06,230
OK, so but Vinnie Relu, S.H. equals S.H. plus one.

132
00:09:07,130 --> 00:09:11,040
So the output of this expression is an integer, no doubt.

133
00:09:11,660 --> 00:09:13,440
OK, so according to this rule.

134
00:09:14,870 --> 00:09:18,620
The value of this expression is an integer, no doubt.

135
00:09:19,040 --> 00:09:25,610
But what you are doing, you are converting this integer into a character, basically integer is a four

136
00:09:25,610 --> 00:09:26,030
bytes.

137
00:09:27,110 --> 00:09:27,360
Okay.

138
00:09:27,770 --> 00:09:28,940
So it is a four bytes.

139
00:09:30,560 --> 00:09:33,730
And what they are doing, you are converting these four bytes.

140
00:09:33,800 --> 00:09:36,260
This integer into this collectivities of one byte.

141
00:09:36,920 --> 00:09:42,080
So the character corresponding to So S.H. plus one is 66.

142
00:09:42,530 --> 00:09:50,000
So the character corresponding to Values 66 is getting matte is getting inserted into this box.

143
00:09:50,210 --> 00:09:50,740
S.H..

144
00:09:51,470 --> 00:09:52,610
Okay, so this is B.

145
00:09:54,710 --> 00:10:03,490
See this part, the output of this is an integer and the character map with integer is getting stored

146
00:10:03,490 --> 00:10:10,060
in two variable S.H. and then you are printing that variable, which is B, let's see one more example

147
00:10:10,180 --> 00:10:11,150
to make things clear.

148
00:10:19,310 --> 00:10:20,540
So what do we do?

149
00:10:23,360 --> 00:10:25,080
S.H., it goes.

150
00:10:27,880 --> 00:10:30,510
C.H., bless them.

151
00:10:31,940 --> 00:10:33,680
OK, so let's build and.

152
00:10:34,450 --> 00:10:36,310
First of all, let's Comando this plane.

153
00:10:37,960 --> 00:10:39,580
And also coming down this line.

154
00:10:42,010 --> 00:10:42,600
So come on.

155
00:10:42,640 --> 00:10:43,450
This line also.

156
00:10:44,440 --> 00:10:44,620
OK.

157
00:10:44,680 --> 00:10:49,720
So the value of variable CS capitally and then you are adding tend to it.

158
00:10:49,810 --> 00:10:50,690
So what will happen.

159
00:10:52,320 --> 00:10:52,920
Billin.

160
00:10:56,690 --> 00:10:59,600
OK, so we are not bringing anything, let's bring something.

161
00:11:01,950 --> 00:11:02,610
She owed.

162
00:11:04,860 --> 00:11:05,530
C.H..

163
00:11:12,860 --> 00:11:18,020
So character is getting printed because that's Kevin of character, avil, character key will be.

164
00:11:19,990 --> 00:11:20,710
Just a second.

165
00:11:22,930 --> 00:11:24,430
This value is.

166
00:11:26,190 --> 00:11:29,790
Capital images 65, you're riding 10 to it.

167
00:11:30,540 --> 00:11:33,540
So S.H. equals C, H, plus 10.

168
00:11:35,420 --> 00:11:38,680
This whole value is 75, OK?

169
00:11:39,620 --> 00:11:45,930
So the character corresponding to 75 is getting stored in variable age, which is key.

170
00:11:46,220 --> 00:11:50,120
And then you are printing this character key here.

171
00:11:51,280 --> 00:11:51,570
OK.

172
00:11:52,490 --> 00:11:53,300
So very easy.

173
00:11:55,750 --> 00:11:58,630
Now, let us see one of the most important thing.

174
00:11:58,760 --> 00:11:59,380
At around.

175
00:12:00,980 --> 00:12:02,540
OK, so what is a wrap around?

176
00:12:07,800 --> 00:12:08,790
Wrap around.

177
00:12:11,290 --> 00:12:11,490
OK.

178
00:12:11,960 --> 00:12:17,630
So I told you character Pless character is an endangered.

179
00:12:19,460 --> 00:12:20,920
Okay, so I told you about this.

180
00:12:21,430 --> 00:12:24,340
So what will happen if you print out?

181
00:12:25,600 --> 00:12:27,660
Character, a plus character.

182
00:12:28,920 --> 00:12:34,920
So where to live my output, my output will be 65 plus 65, which is 130.

183
00:12:36,240 --> 00:12:36,810
No doubt.

184
00:12:37,860 --> 00:12:41,460
But what will happen if you ride?

185
00:12:41,880 --> 00:12:42,780
Cassie H.

186
00:12:43,090 --> 00:12:46,560
Equals capital, a blessed capitally.

187
00:12:48,100 --> 00:12:54,620
I told you that the output of this expression is an integer, which is 130 and the correct, they're

188
00:12:54,630 --> 00:12:56,400
corresponding to 130.

189
00:12:57,560 --> 00:13:00,770
Will be stored in variable CIJ.

190
00:13:01,400 --> 00:13:07,310
But data problem in the last class, I told you that the range of character that the range of character

191
00:13:07,320 --> 00:13:12,140
dirty diapers from minus 128 to 127.

192
00:13:13,340 --> 00:13:15,310
So days and I think all the.

193
00:13:16,630 --> 00:13:16,820
OK.

194
00:13:17,280 --> 00:13:18,090
So what will happen?

195
00:13:20,990 --> 00:13:31,100
So and so what happened is generally this is minus 128, then minus 127, 126 and 127.

196
00:13:31,820 --> 00:13:40,730
So when you are standing here and if you do plus one, 127 plus one, so you will reach here.

197
00:13:43,200 --> 00:13:48,390
Okay, so you are standing at 127, and if you look plus one, you will reach here.

198
00:13:48,750 --> 00:13:50,400
This thing is called wrap around.

199
00:13:52,190 --> 00:13:52,460
Rep.

200
00:13:53,490 --> 00:13:53,910
Around.

201
00:13:57,540 --> 00:14:03,100
OK, so one 27 plus one is minus 128.

202
00:14:03,960 --> 00:14:11,850
Similarly went on to say one plus two is minus 127, went on the seven plus three and it goes to minus

203
00:14:11,850 --> 00:14:12,690
126.

204
00:14:13,320 --> 00:14:15,510
So in this case, this will lose 130.

205
00:14:16,740 --> 00:14:21,000
So the character corresponding to 130 is getting stored in S.H..

206
00:14:21,240 --> 00:14:25,510
And that character is mapped with minus 126.

207
00:14:25,920 --> 00:14:26,150
OK.

208
00:14:27,690 --> 00:14:32,190
So, for example, if you ride can H is it goes to 127.

209
00:14:32,790 --> 00:14:38,730
So the character corresponding to 127 is stored in variable C h.

210
00:14:40,040 --> 00:14:47,420
And then if you do see H equals C, H plus one, that is 127 plus one, which will be close to minus

211
00:14:47,420 --> 00:14:49,430
128 due to wrap around.

212
00:14:50,370 --> 00:14:55,940
So minus went on there, the correct corresponding to minus 128 will be stored in variable C h.

213
00:14:56,360 --> 00:14:58,660
And if you print C, H.

214
00:14:59,360 --> 00:15:03,530
So that correctively blueprinted which is mapped to minus 128.

215
00:15:05,390 --> 00:15:08,660
So this wrap around things happens with another diaper as well.

216
00:15:09,080 --> 00:15:11,990
For example, I told you that the range of integers.

217
00:15:13,190 --> 00:15:20,090
Is from minus two to the power 31 to that about her division minus one.

218
00:15:20,120 --> 00:15:21,390
So this was the range of.

219
00:15:23,160 --> 00:15:25,620
So actually, this thing is called into Max.

220
00:15:29,310 --> 00:15:30,990
And this thing is called Anderman.

221
00:15:33,820 --> 00:15:35,800
So here I am having Anderman.

222
00:15:37,080 --> 00:15:38,610
And you have intermix here.

223
00:15:44,700 --> 00:15:49,770
So if we will add plus one to the endemics, you will reach Intiman.

224
00:15:51,200 --> 00:15:53,070
OK, so this is a wrap around.

225
00:15:56,980 --> 00:15:58,170
And the bank says nothing.

226
00:15:58,290 --> 00:16:00,410
It is just good, it's about doing minus one.

227
00:16:00,720 --> 00:16:04,280
This value has been given some name and that name is in the banks.

228
00:16:04,380 --> 00:16:05,810
Similarly, in is nothing.

229
00:16:06,660 --> 00:16:08,940
It is minus two to the power 31.

230
00:16:09,270 --> 00:16:12,600
It is just Antoin is just the name of this value.

231
00:16:14,610 --> 00:16:17,580
OK, so now let's talk about explicit typecasting.

232
00:16:18,510 --> 00:16:21,750
So implicit typecasting was which was done automatically.

233
00:16:21,870 --> 00:16:23,010
We are not doing anything.

234
00:16:23,280 --> 00:16:25,260
It is done automatically by the compiler.

235
00:16:26,220 --> 00:16:30,540
So I told you, remember this thing flawed.

236
00:16:31,320 --> 00:16:32,760
Then you have integers.

237
00:16:33,030 --> 00:16:34,290
Then you have characters.

238
00:16:34,380 --> 00:16:35,340
And then you have bull.

239
00:16:37,020 --> 00:16:38,400
So from lower to upper.

240
00:16:39,510 --> 00:16:40,740
From lower to upper.

241
00:16:43,880 --> 00:16:49,790
This is called implicit typecasting because these type conclusion are done automatically by the compiler.

242
00:16:50,180 --> 00:16:53,180
But what if I want to do the reverse?

243
00:16:54,050 --> 00:16:56,990
I want to convert integer to character.

244
00:16:57,770 --> 00:16:58,880
So we are doing the reverse.

245
00:16:59,330 --> 00:17:01,850
So this thing will be called explicit typecasting.

246
00:17:03,520 --> 00:17:05,770
OK, so let's see an example.

247
00:17:12,920 --> 00:17:14,610
So for explicit typecasting.

248
00:17:14,760 --> 00:17:15,560
What you will do.

249
00:17:17,650 --> 00:17:18,710
Commander Daoud also.

250
00:17:22,050 --> 00:17:28,240
So for explicit typecasting, what you will do, for example, you are having gay S.H..

251
00:17:29,820 --> 00:17:32,970
It goes like character.

252
00:17:34,440 --> 00:17:41,640
Suppose you want to find you want to convert this character into integer.

253
00:17:41,660 --> 00:17:42,000
You will.

254
00:17:42,150 --> 00:17:42,750
What you will do.

255
00:17:42,780 --> 00:17:44,410
You will just write in.

256
00:17:45,430 --> 00:17:47,360
And then you will write to S.H..

257
00:17:49,140 --> 00:17:51,690
So this thing is called explicit typecasting.

258
00:17:52,590 --> 00:17:55,380
So what is the value of variable?

259
00:17:55,390 --> 00:17:55,740
Well.

260
00:17:59,430 --> 00:18:01,650
It is nothing but 65.

261
00:18:02,170 --> 00:18:05,010
OK, so let's build and lemon.

262
00:18:08,450 --> 00:18:10,530
Sixty 65 is getting printed.

263
00:18:11,100 --> 00:18:11,330
OK.

264
00:18:11,730 --> 00:18:15,000
So this is called explicit typecasting.

265
00:18:15,240 --> 00:18:16,900
We are typecasting ourself.

266
00:18:20,610 --> 00:18:28,650
Let's take let's take one more example, for example, voodoo will be a true.

267
00:18:34,850 --> 00:18:37,640
And X equals.

268
00:18:41,010 --> 00:18:41,720
Typecast.

269
00:18:42,490 --> 00:18:42,860
B.

270
00:18:44,260 --> 00:18:46,810
And then you are printing the value of X.

271
00:18:46,960 --> 00:18:48,130
So what do I my output.

272
00:18:50,110 --> 00:18:51,220
My output will be one.

273
00:18:55,900 --> 00:18:57,020
So when is getting printed?

274
00:18:57,040 --> 00:18:57,540
Why, when?

275
00:18:58,090 --> 00:19:01,660
Because through means one false means zero simple.

276
00:19:03,340 --> 00:19:04,810
Now, let's see one more example.

277
00:19:08,320 --> 00:19:11,400
And way equals 70.

278
00:19:13,980 --> 00:19:14,440
S.H..

279
00:19:15,880 --> 00:19:16,980
It was.

280
00:19:21,260 --> 00:19:25,380
Why and then you are printing C.H..

281
00:19:26,060 --> 00:19:27,230
So where to live my output.

282
00:19:29,950 --> 00:19:32,160
So the value of variable Y is seventy.

283
00:19:32,210 --> 00:19:35,240
And then you'll come out doing that seven days into a character.

284
00:19:35,690 --> 00:19:38,030
So the character mapped with 70 will get printed.

285
00:19:41,290 --> 00:19:42,720
So there is an error in this line.

286
00:19:42,790 --> 00:19:43,840
Oh, so that it is.

287
00:19:43,960 --> 00:19:45,890
We have already declared the variable C.H..

288
00:19:46,720 --> 00:19:49,480
So let's change the name ABC.

289
00:19:53,620 --> 00:19:57,970
A B.S., OK, so you can't have two variables with the same name.

290
00:20:02,550 --> 00:20:05,980
So their character maybe with the 70s Capital F..

291
00:20:07,390 --> 00:20:10,170
OK, so what is the problem?

292
00:20:10,740 --> 00:20:12,270
What is the problem with typecasting?

293
00:20:12,420 --> 00:20:13,850
So the problem is very simple.

294
00:20:16,370 --> 00:20:19,460
Flawed and.

295
00:20:21,190 --> 00:20:21,600
Gad.

296
00:20:22,740 --> 00:20:30,810
And, Wolf, if you're going from lower to upper, if you're converting any lower into upper, in that

297
00:20:30,810 --> 00:20:32,220
case, we don't have any problem.

298
00:20:32,230 --> 00:20:34,800
For example, if you want to convert.

299
00:20:34,830 --> 00:20:38,430
If you want to typecast the character into Integer, what will happen?

300
00:20:38,460 --> 00:20:43,080
This is of one byte and then integer is of four bytes.

301
00:20:44,520 --> 00:20:49,190
So this one bite can easily be copied in this integer.

302
00:20:50,100 --> 00:20:56,580
But as soon as you try and reverse, for example, you want to convert integer in a character in the

303
00:20:56,580 --> 00:21:03,720
last example where there did something like this, also what we did and divide was 70 and.

304
00:21:04,770 --> 00:21:05,880
Can ABC.

305
00:21:08,580 --> 00:21:09,250
Care, right?

306
00:21:09,960 --> 00:21:11,280
So if you want to do this.

307
00:21:12,020 --> 00:21:13,350
So what are you doing?

308
00:21:16,180 --> 00:21:24,130
This is why four bites, and this is my character, just one bite and were destroyed, Windows doing

309
00:21:25,240 --> 00:21:27,530
it will copy only one bite.

310
00:21:30,030 --> 00:21:33,720
Into the character and all this data will be lost.

311
00:21:36,400 --> 00:21:40,400
OK, so in this case, my data is not lost because the variable.

312
00:21:40,510 --> 00:21:46,700
Well, because the variable Y is containing small value and 70 can be written in eight bytes.

313
00:21:46,820 --> 00:21:47,900
So this is Edwards.

314
00:21:49,430 --> 00:21:52,080
And the remaining is gurantee forwards.

315
00:21:53,080 --> 00:21:56,910
So 70 can be written in eight, which that's why there is no details.

316
00:21:57,320 --> 00:22:04,790
But if the number was very large, for example, let's say if the number was this and then if you typecast

317
00:22:04,850 --> 00:22:08,000
this integer into a character, then there will be a detailers.

318
00:22:09,220 --> 00:22:09,460
OK.

319
00:22:10,120 --> 00:22:14,080
So I hope you come to know what is implicit and explicit typecasting.

320
00:22:14,860 --> 00:22:17,710
Typecasting means which is done automatically by the compiler.

321
00:22:17,770 --> 00:22:29,740
For example, character Pless in Bajour is an integer integer divided by a flawed is a flawed and indeed

322
00:22:29,740 --> 00:22:33,190
the less flawed is flawed.

323
00:22:34,960 --> 00:22:39,830
Similarly, integer in character is an integer.

324
00:22:41,080 --> 00:22:41,370
Okay.

325
00:22:42,130 --> 00:22:43,060
And a character.

326
00:22:43,060 --> 00:22:45,040
Pless character is also an integer.

327
00:22:46,360 --> 00:22:50,640
In this case, that Abbadon possibility's there and an explicit typecasting.

328
00:22:50,650 --> 00:22:51,340
What will do?

329
00:22:51,910 --> 00:22:54,270
For example, you will write GABSI h.

330
00:22:54,430 --> 00:22:56,480
As it goes to typecast into character.

331
00:22:57,130 --> 00:23:01,990
And if let's say and Y equals 10, it will write something like this.

332
00:23:02,240 --> 00:23:04,180
Okay, so this is explicit.

333
00:23:06,880 --> 00:23:09,360
We are converging in this case.

334
00:23:09,420 --> 00:23:10,680
This is called implicit.

335
00:23:11,340 --> 00:23:13,350
It is done automatically by the compiler.

336
00:23:13,710 --> 00:23:16,530
And the last thing today that we learned is wrap around.

337
00:23:18,150 --> 00:23:25,530
OK, if you're standing at the maximum value and you will add blessin, you will reach the minimum value.

338
00:23:26,790 --> 00:23:28,830
OK, so this is it for this video.

339
00:23:29,040 --> 00:23:29,850
Thanks for watching.
