1
00:00:01,340 --> 00:00:05,870
Hi every rental in this lesson we are going to study this new topic strings.

2
00:00:05,930 --> 00:00:08,360
So for example you want to store something like this.

3
00:00:09,710 --> 00:00:11,150
So this is actually a string.

4
00:00:11,150 --> 00:00:12,920
This is an example of a string.

5
00:00:12,920 --> 00:00:20,180
So this thing cannot be stored in any integer Eddie we cannot stored the string hello inside it in detail.

6
00:00:20,210 --> 00:00:21,770
So what do we need.

7
00:00:21,770 --> 00:00:22,930
We need a one day mission.

8
00:00:22,940 --> 00:00:24,340
Correct Barry.

9
00:00:24,470 --> 00:00:27,360
So what is the difference between integer and connectivity.

10
00:00:27,380 --> 00:00:29,810
So everything will look very similar.

11
00:00:29,810 --> 00:00:32,260
So let's say you want to create an NDA area of size 10.

12
00:00:32,290 --> 00:00:40,000
So what will happen so this will be your index as you do and the last index will be index nine.

13
00:00:40,140 --> 00:00:41,600
And how much space.

14
00:00:41,640 --> 00:00:45,010
So for storing when digit I need four bytes.

15
00:00:45,030 --> 00:00:46,240
So the suspend.

16
00:00:46,260 --> 00:00:49,120
So the space will be 40 bytes.

17
00:00:49,140 --> 00:00:51,450
Now similarly how can you call it connectivity.

18
00:00:51,660 --> 00:00:52,900
So I will write correct.

19
00:00:52,970 --> 00:00:55,870
Any of that it be and let's say the size is 10.

20
00:00:55,890 --> 00:00:57,030
So what will happen again.

21
00:00:57,030 --> 00:00:58,220
Very similar.

22
00:00:58,500 --> 00:01:01,510
The Fostering mix is 0 and the last index is 9.

23
00:01:01,620 --> 00:01:07,340
And for storing one character I need one byte so this total is actually 10 bytes only.

24
00:01:07,620 --> 00:01:09,620
So everything is working quite similar.

25
00:01:09,630 --> 00:01:12,020
Now let's see the defense whether defense will come.

26
00:01:12,030 --> 00:01:15,050
So if you want to take input in beta what you will do.

27
00:01:15,060 --> 00:01:18,690
So first of all you will take how many elements you want to take input.

28
00:01:18,720 --> 00:01:22,840
So you will write to CNN and basically then you will use a for loop.

29
00:01:22,950 --> 00:01:30,100
So then I equals zero I list and and I bless plus and you will do something like this scene if I.

30
00:01:30,570 --> 00:01:33,810
So this is for taking input inside an integer area.

31
00:01:34,810 --> 00:01:37,820
Now how we will take input inside correct.

32
00:01:37,960 --> 00:01:39,970
So the connector area a little bit special.

33
00:01:40,000 --> 00:01:43,420
So if you will write C in the name that is B.

34
00:01:43,420 --> 00:01:45,210
So it will write CMB.

35
00:01:45,280 --> 00:01:46,750
So this will actually work.

36
00:01:46,840 --> 00:01:53,020
You do not have to use for loop for the character that is seen we work specially scene will work differently

37
00:01:53,230 --> 00:01:54,220
for connectivity.

38
00:01:54,910 --> 00:01:59,350
So what you can do if you like scene B and if you give then Butler took coding.

39
00:01:59,440 --> 00:02:06,910
So what will happen this coding will get stored in this C or B I N N G you do not have to use for loop

40
00:02:07,300 --> 00:02:11,260
for taking input inside you for taking input for the correct battery.

41
00:02:11,350 --> 00:02:16,990
So that's why I regret a little bit special now for printing the.

42
00:02:17,230 --> 00:02:20,170
Now for printing the content of the edit what you will do.

43
00:02:20,170 --> 00:02:26,560
Again you have to use a for loop so equals zero i.e. less than N I plus plus and you will write something

44
00:02:26,560 --> 00:02:32,410
like this C out of I know this thing is for printing the content of the area.

45
00:02:32,950 --> 00:02:36,530
So this is for and ready and for correct Barry.

46
00:02:36,610 --> 00:02:39,610
Again that things will work a little bit differently.

47
00:02:39,700 --> 00:02:40,690
So what will happen.

48
00:02:40,720 --> 00:02:46,330
You can likely write see out B if you will write the old then what will happen to the content of that

49
00:02:46,330 --> 00:02:47,410
it will get printed.

50
00:02:47,560 --> 00:02:54,190
So that will put will be according so seen and see out there working differently for the correct baddie

51
00:02:54,220 --> 00:03:02,790
because the correct word is a little bit special now.

52
00:03:02,820 --> 00:03:06,010
Now let's see again how can we take and putting corrected.

53
00:03:06,570 --> 00:03:09,020
So you are creating a baddie.

54
00:03:09,060 --> 00:03:10,690
Let's say the size is 10.

55
00:03:10,770 --> 00:03:13,640
So again what will happen.

56
00:03:13,860 --> 00:03:17,640
This will be your index 0 and your last read next will be the next 9.

57
00:03:17,640 --> 00:03:25,140
Now if you will write CMB and let's say you give the input coding so how coding will get stored.

58
00:03:25,500 --> 00:03:30,870
So this is C then 0 then B then I then n then G.

59
00:03:31,020 --> 00:03:32,130
So it will not stop here.

60
00:03:32,130 --> 00:03:36,360
So what will happen scene scene is working differently for character.

61
00:03:36,390 --> 00:03:42,360
So after you give the input what will happen a null character will get automatically appended.

62
00:03:42,390 --> 00:03:47,350
So this is big zero and takes one two three four and five.

63
00:03:47,400 --> 00:03:53,520
So at index six this null corrector we get appended automatically.

64
00:03:53,520 --> 00:03:54,280
So we call.

65
00:03:54,390 --> 00:03:55,740
So what is happening.

66
00:03:55,980 --> 00:04:01,010
So this null corrector we get automatically appended at the last.

67
00:04:01,140 --> 00:04:06,010
And this character the name of this character is actually another character.

68
00:04:06,100 --> 00:04:12,910
So this is actually a null character and it is asking value is actually zero.

69
00:04:13,900 --> 00:04:16,570
So now you will be thinking What is the use of this character.

70
00:04:16,570 --> 00:04:19,360
So so it looks as are Terminator

71
00:04:22,160 --> 00:04:26,260
so when you will write C out to be.

72
00:04:26,330 --> 00:04:27,170
So what will happen.

73
00:04:27,170 --> 00:04:34,140
I will go to this index zero I will print the content so I will print c then I will print or then D.

74
00:04:34,170 --> 00:04:40,020
Then I then LNG so the I n n g then what will happen I will try to print.

75
00:04:40,020 --> 00:04:40,820
So what will happen.

76
00:04:40,830 --> 00:04:44,890
I will reach this null character and the meaning of no good.

77
00:04:44,940 --> 00:04:46,290
Those actually are terminated.

78
00:04:46,320 --> 00:04:48,170
So what I will do I will stop.

79
00:04:48,210 --> 00:04:54,020
So as soon as I will reach it and then I will stop printing I'm repeating myself.

80
00:04:55,260 --> 00:04:57,740
For taking in pertinent time period we will write like this.

81
00:04:57,740 --> 00:05:02,720
C in B and let's say you're giving according saw to happen according will get stored in this manner

82
00:05:02,790 --> 00:05:07,420
and at the end another character will get automatically appended by C in.

83
00:05:08,310 --> 00:05:13,940
So this is a property of the correct battery and thus no character is actually going to work as a terminator.

84
00:05:13,940 --> 00:05:19,050
It's asking value is actually zero and this Terminator is going to be used when you are printing the

85
00:05:19,050 --> 00:05:20,620
content of the correct baddie.

86
00:05:20,670 --> 00:05:25,290
If you would like to see out what will happen you will go to the foster index basically next zero you

87
00:05:25,290 --> 00:05:30,150
will print the content of the edit until you reaches this terminating character.

88
00:05:30,450 --> 00:05:36,590
So as soon as you reach this new character you will stop printing as soon as we will reach this permeating

89
00:05:36,600 --> 00:05:36,960
character.

90
00:05:36,960 --> 00:05:41,410
We will stop printing so that's how the output is going to be according.

91
00:05:41,470 --> 00:05:49,740
Okay so let's take one example so for example you are creating links in the name of field at is actually

92
00:05:49,740 --> 00:05:52,810
name and let's say the size is hundred.

93
00:05:52,920 --> 00:05:54,750
So what will happen.

94
00:05:54,960 --> 00:05:57,250
So this is you Eddie.

95
00:05:57,330 --> 00:06:02,420
This is index 0 next one index 2 so index 1 index 2 and your last index would be 99.

96
00:06:02,760 --> 00:06:06,370
And this is your name Eddy correct.

97
00:06:06,410 --> 00:06:07,980
Now again if you will right.

98
00:06:07,980 --> 00:06:13,260
See in name and let's say you given put ABC.

99
00:06:13,260 --> 00:06:15,090
So what will happen even come here.

100
00:06:15,090 --> 00:06:21,390
We will come and see welcome it and I know look at it will come back in next 3 automatically.

101
00:06:21,480 --> 00:06:26,310
So now you can actually be appended automatically and if you write see our name.

102
00:06:26,400 --> 00:06:27,560
So what will happen.

103
00:06:27,630 --> 00:06:32,100
Print a brand to be brand C and then you will reach this null character.

104
00:06:32,130 --> 00:06:40,980
So stop printing so you will print a b and c now let's best bastard.

105
00:06:41,060 --> 00:06:45,650
Now let's write the code so that you guys can have a better understanding so the name of the file is

106
00:06:45,650 --> 00:06:47,360
click bait or TPP.

107
00:06:47,420 --> 00:06:48,550
So what do we want to do.

108
00:06:48,560 --> 00:06:55,510
I want to create a chaotic baddie so let's say the name let's say the new that is name actually the

109
00:06:55,510 --> 00:06:58,370
size is hundred and let's take and put

110
00:07:04,740 --> 00:07:05,550
enter your name

111
00:07:10,340 --> 00:07:16,140
so for taking and put inside a character you can likely use scene you do not have to use a for loop

112
00:07:16,480 --> 00:07:19,700
C name because correct bad.

113
00:07:19,770 --> 00:07:27,290
I was a special CNN CEO to work differently from them so you would name is.

114
00:07:27,420 --> 00:07:34,270
So what we'll do I will likely write she out name correct and I will write and line here.

115
00:07:34,350 --> 00:07:35,630
So what should be our output.

116
00:07:35,640 --> 00:07:39,870
So whatever you will enter will get printed here.

117
00:07:40,140 --> 00:07:41,310
So let's test up m

118
00:07:44,590 --> 00:07:49,540
let say my name is ABC the so your name is ABC.

119
00:07:49,570 --> 00:07:51,640
So our Gore is working fine.

120
00:07:51,790 --> 00:07:52,960
Now what is happening here.

121
00:07:56,990 --> 00:07:59,830
So let's say I'm ending the name ABC.

122
00:07:59,840 --> 00:08:00,580
So what did happen.

123
00:08:00,590 --> 00:08:10,300
This is you're correct Barry the name of this is actually name so this the last 16 is going to be nine

124
00:08:10,300 --> 00:08:10,570
game.

125
00:08:10,570 --> 00:08:12,080
This is index zero this is the next one.

126
00:08:12,070 --> 00:08:15,580
This is a mixed two and let's say you enter ABC.

127
00:08:15,580 --> 00:08:16,320
So this is a.

128
00:08:16,330 --> 00:08:21,890
This is B and this is C and automatically and know correct I will get appended at indexed 3.

129
00:08:21,970 --> 00:08:26,800
Now what will happen if at indexed for I write x.

130
00:08:26,860 --> 00:08:28,020
So what will happen.

131
00:08:28,090 --> 00:08:31,920
So if I will then the program will this actually get printed or not.

132
00:08:31,930 --> 00:08:36,080
So what I want to say if I do something like this Let's animal food.

133
00:08:36,160 --> 00:08:39,090
So initially the name of food is containing a garbage value.

134
00:08:39,220 --> 00:08:46,850
And if I do name all food it goes X and then I tried to write C O name.

135
00:08:47,200 --> 00:08:48,940
So what should be my output.

136
00:08:48,940 --> 00:08:53,620
I think my output should be ABC only because what is the proper Yossi out.

137
00:08:53,620 --> 00:08:57,950
So it was starting from the first character it will read e it will print a.

138
00:08:58,000 --> 00:09:04,750
Then it will print B then it will print c and then it will reach the null character was read as soon

139
00:09:04,750 --> 00:09:05,940
as it will reach it and then.

140
00:09:06,070 --> 00:09:13,340
I will stop printing so that's why my output is going to be ABC and not this X so this X will not be

141
00:09:13,340 --> 00:09:19,210
printed so let's test our program and let's see what will happen.

142
00:09:19,230 --> 00:09:23,550
So what I want to say is let's say I'm changing the food correct.

143
00:09:23,580 --> 00:09:26,620
So initially the food character is null sorry.

144
00:09:26,670 --> 00:09:30,150
Initially the fourth character is a garbage in garbage value.

145
00:09:30,150 --> 00:09:34,650
So let's say I want to make it the oh let's say x.

146
00:09:34,660 --> 00:09:40,020
So what will happen as discussed I would either Bush or ABC only.

147
00:09:40,020 --> 00:09:44,700
So and but as ABC and I would output is ABC only

148
00:09:48,190 --> 00:09:50,900
now what will happen if I do something like this.

149
00:09:51,010 --> 00:10:02,010
So my input was ABC so I have a then B then C then then and add the fourth character default index.

150
00:10:02,400 --> 00:10:08,870
I made the fourth index X so this is index 0 next one and next to index 3 and index 4.

151
00:10:08,890 --> 00:10:12,440
Now if I change the value of index 3 if I write dy here.

152
00:10:13,380 --> 00:10:20,230
So what I want to see if at the next three so I do next three analysts present if you will change the

153
00:10:20,230 --> 00:10:21,310
third index value.

154
00:10:21,370 --> 00:10:30,270
So if you will make a D and then if you will write C out the name then what should be our output.

155
00:10:30,420 --> 00:10:31,510
So what will happen.

156
00:10:31,650 --> 00:10:33,710
C out has a very standard property.

157
00:10:33,720 --> 00:10:35,570
It was starting from the first character.

158
00:10:35,670 --> 00:10:36,740
It will print a.

159
00:10:36,950 --> 00:10:43,710
Then it will print B then it will print C then it will print D because this is D.

160
00:10:43,770 --> 00:10:52,710
So ABC then it will print x and it will keep going on until it encounters no character.

161
00:10:52,800 --> 00:10:59,250
I be reading myself after printing ABC the X it will go to index wife then it will go to index X it

162
00:10:59,250 --> 00:11:06,120
will go to index 7 and it was and it will continue printing the elements and then it will not reach

163
00:11:06,240 --> 00:11:07,470
the null corrected.

164
00:11:07,800 --> 00:11:10,680
So as soon as it will reach an incorrect bet it will stop printing.

165
00:11:10,710 --> 00:11:15,460
Otherwise it will print everything so let's see.

166
00:11:15,500 --> 00:11:16,450
So what I want to do

167
00:11:20,300 --> 00:11:22,320
so I want to change the title character.

168
00:11:22,770 --> 00:11:28,680
So the title character was null because I'm going to insert I'm going to give in but ABC and later the

169
00:11:28,690 --> 00:11:32,060
title correct is Dino Laird's best up program

170
00:11:35,150 --> 00:11:36,350
so I'm going to give input.

171
00:11:36,380 --> 00:11:38,520
ABC.

172
00:11:38,700 --> 00:11:40,140
So this is my output.

173
00:11:40,170 --> 00:11:44,690
ABC X then a special character and then.

174
00:11:45,000 --> 00:11:46,020
So what is happening here.

175
00:11:47,040 --> 00:11:49,650
Again very simple logic.

176
00:11:49,650 --> 00:11:51,120
You give the input ABC.

177
00:11:51,120 --> 00:11:56,430
So this is a then b then c and automatically and then it will be appended.

178
00:11:56,490 --> 00:11:58,590
Then you change the value of nil.

179
00:11:58,620 --> 00:12:03,150
So this is Dino then at default and X you put X..

180
00:12:03,360 --> 00:12:05,110
So what is the property of C out.

181
00:12:05,370 --> 00:12:06,820
So what should we do with name.

182
00:12:06,870 --> 00:12:12,690
It will print a it will print to be it will be in C it will happen to be it will print x and it will

183
00:12:12,690 --> 00:12:17,060
continue printing everything until it produce an electric bill.

184
00:12:17,310 --> 00:12:22,500
So and so this is index 0 1 2 3 4 and in next 5.

185
00:12:22,560 --> 00:12:28,920
So this is especially good at fighting this especially getting base presented then agent execs and misrepresent

186
00:12:29,280 --> 00:12:32,170
and add index 7 my network correctly present.

187
00:12:32,220 --> 00:12:34,360
So that's why it will stop.

188
00:12:34,530 --> 00:12:42,150
It will print only this much part so by John's agenda it's seven connect base present.

189
00:12:42,300 --> 00:12:51,880
How many can pick and be present because it is a garbage because everything is garbage so garbage values

190
00:12:51,970 --> 00:12:52,360
out there.

191
00:12:52,390 --> 00:13:00,310
And one of the God raised values happened to be a little character so from index 5 onwards from index

192
00:13:00,310 --> 00:13:07,670
5 onwards my character is containing garbage values and add index seven by Johns the garbage value is

193
00:13:07,760 --> 00:13:08,510
connected.

194
00:13:08,620 --> 00:13:11,680
So that's why we stop printing at index 7.

195
00:13:11,710 --> 00:13:17,160
So that's why my output is a B C D X and two special characters.

196
00:13:17,440 --> 00:13:19,210
So that's how it is working.

197
00:13:22,320 --> 00:13:23,580
Now if I could do one more thing.

198
00:13:23,610 --> 00:13:24,560
So what I'm doing here.

199
00:13:25,140 --> 00:13:28,800
So I'm giving input ABC and then I have none here.

200
00:13:28,800 --> 00:13:32,180
Then if I change the value of b if I will write and here.

201
00:13:32,190 --> 00:13:33,670
So what will be my output.

202
00:13:33,690 --> 00:13:35,120
So let's try to test.

203
00:13:35,130 --> 00:13:38,290
But am up and let's see what will be our output.

204
00:13:38,330 --> 00:13:42,450
So what I want to say I'm going to change the second character.

205
00:13:42,510 --> 00:13:48,640
So that means second Burmese Foster index so I want to change my first index.

206
00:13:48,640 --> 00:13:55,370
So instead of B I want to make it null and then let's see what we will output

207
00:13:59,200 --> 00:14:00,780
ABC.

208
00:14:00,810 --> 00:14:07,890
So now output is only by only eight because it is very obvious CO2 will print only the first character

209
00:14:07,950 --> 00:14:11,290
because the second character is going to be null and it will stop printing.

210
00:14:11,310 --> 00:14:12,430
So what I want to say.

211
00:14:12,480 --> 00:14:18,590
So enter your name you will give the value ABC and you are changing the first character to be noted.

212
00:14:18,600 --> 00:14:21,510
So this is null no then you are printing the name.

213
00:14:21,510 --> 00:14:25,850
So what will happen is the old will print e then see do will reach this new character.

214
00:14:25,860 --> 00:14:27,030
And it will stop printing.

215
00:14:27,030 --> 00:14:32,010
So that's why my output is only so that's why it is presented.

216
00:14:32,010 --> 00:14:35,820
So I think you now have a good idea how good it is book.

217
00:14:35,820 --> 00:14:40,010
So in the next radio we will solve a few questions so that you guys can have a better understanding.

218
00:14:40,020 --> 00:14:41,060
I to do it by.
