1 00:00:00,180 --> 00:00:08,220 Action is regarding arrests in C++, so we have studied about variables, data types and also we have 2 00:00:08,220 --> 00:00:16,140 looked into control statements and patient statements support like when we are declaring a simple single 3 00:00:16,140 --> 00:00:21,810 immediately, it will really having a provision to store one value in that meeting for. 4 00:00:22,690 --> 00:00:24,130 So if I'm declaring. 5 00:00:26,980 --> 00:00:29,380 Let me get the panel so for you. 6 00:00:30,880 --> 00:00:34,810 OK, so if I'm declaring E! 7 00:00:35,200 --> 00:00:43,330 Equal to 10, then my baby will be having a provision to hold only one value, they're distant if I'm 8 00:00:43,330 --> 00:00:46,220 giving equal opportunity at some point of time. 9 00:00:46,540 --> 00:00:51,700 This existing 10 will be replaced with 20 and it will store that value. 10 00:00:51,910 --> 00:00:57,400 So if I want to store 10 different values, I will need 10 different variables. 11 00:00:57,420 --> 00:01:01,990 State if I'm naming my baby was ABC to like, like like that. 12 00:01:02,200 --> 00:01:07,810 If I'm having 10 different values, I will need to use 10 different variables. 13 00:01:10,070 --> 00:01:18,860 So this is not a good practice, so in order to do store similar kind of values consecutively within 14 00:01:18,890 --> 00:01:26,130 same name, I will be having our day best picture on a provision in the C++ part of this. 15 00:01:27,560 --> 00:01:36,080 So why does it not a collection of elements of similar database in which the elements can be unique 16 00:01:36,200 --> 00:01:39,080 and located in separate memory locations? 17 00:01:39,350 --> 00:01:41,950 So you can see one array over here. 18 00:01:41,960 --> 00:01:43,400 This is an example for anybody. 19 00:01:43,400 --> 00:01:47,750 Having the name of that is violence, but the same are again stored. 20 00:01:48,880 --> 00:01:56,040 Minivan use it savvy thousand to three point four seven fifty. 21 00:01:56,200 --> 00:02:02,740 All the values that started in this city, but in different locations, memory locations, different 22 00:02:02,740 --> 00:02:04,950 parts in the computer memory. 23 00:02:05,350 --> 00:02:14,590 But what is the case about is it will always use or stored away neighbors in consecutive memory locations 24 00:02:14,830 --> 00:02:16,990 in nearby many locations. 25 00:02:18,530 --> 00:02:24,950 So how we can create in order, we can create an array of new data, right, by specifying the data 26 00:02:24,950 --> 00:02:28,640 type, then really, but tonight, then size of that. 27 00:02:28,760 --> 00:02:33,480 So here is an example int array of 20. 28 00:02:33,860 --> 00:02:44,870 It will create array card array, bit trendy card and security memory locations in memory with the Endesa. 29 00:02:45,770 --> 00:02:49,670 Similarly, I have created one it floor balance of five. 30 00:02:49,730 --> 00:02:51,250 This is next Saturday here. 31 00:02:51,500 --> 00:02:52,760 Like Flot. 32 00:02:53,450 --> 00:03:01,070 This will be a floating point store gallery that any will be balance, and it can be having five memory 33 00:03:01,070 --> 00:03:04,340 locations listed in that computer memory. 34 00:03:04,430 --> 00:03:11,120 So here you can see five memory locations all in and that name is balance. 35 00:03:11,540 --> 00:03:20,600 So the first element of this Iris thousand second element is 2.0, the third item in these three 3.4. 36 00:03:21,610 --> 00:03:23,260 For them in the seven and. 37 00:03:24,750 --> 00:03:26,480 So instead of in this state. 38 00:03:26,820 --> 00:03:27,150 Right. 39 00:03:27,990 --> 00:03:28,470 So. 40 00:03:29,630 --> 00:03:35,540 Even just declaring an error, there would be no value, so here it will be like blind got a no value. 41 00:03:36,080 --> 00:03:43,600 So all the values in this will be nothing but how I can insert this value that is next publicly. 42 00:03:44,060 --> 00:03:48,220 See, here is the way we can insert the values into adding. 43 00:03:48,680 --> 00:03:56,030 So the senior position of this added balance can be accessed by using the statement balance of zero, 44 00:03:56,540 --> 00:03:57,950 then to give that value. 45 00:03:58,070 --> 00:04:01,830 You can use assignment equal to and then put thousand. 46 00:04:01,910 --> 00:04:04,880 So then the thousand will be coming over here. 47 00:04:05,360 --> 00:04:09,020 Similarly, to get the value of the second part of that. 48 00:04:09,470 --> 00:04:11,210 You can use balance of one. 49 00:04:11,690 --> 00:04:16,040 So I was hearing that starts at zero, that that will be one blind. 50 00:04:16,040 --> 00:04:18,530 You have to remember it stocks one zero. 51 00:04:18,770 --> 00:04:20,270 Then it moves forward. 52 00:04:20,750 --> 00:04:26,210 So if I want to get the first element, it should be balance of the second element balance of one. 53 00:04:26,450 --> 00:04:26,800 OK. 54 00:04:27,020 --> 00:04:30,050 Similarly, balance of N minus one. 55 00:04:30,230 --> 00:04:35,100 So I have I saved all the balance, another easily assigning all the values at once. 56 00:04:35,120 --> 00:04:44,960 That's one more way that's shown over here, like flood balance of five equal to zero value lot faster 57 00:04:44,960 --> 00:04:48,350 value, second value, third value for time. 58 00:04:48,380 --> 00:04:53,360 That means by values that all these statements this these doorways are similar. 59 00:04:54,200 --> 00:04:57,140 It will both give you an array like this. 60 00:05:00,330 --> 00:05:00,690 OK. 61 00:05:02,990 --> 00:05:05,420 No, we have it time for our demo session. 62 00:05:05,540 --> 00:05:11,870 We can go to C++ program and see how what I sort of used in C++. 63 00:05:12,710 --> 00:05:13,830 So we had in the program. 64 00:05:13,850 --> 00:05:14,450 Let's see. 65 00:05:14,810 --> 00:05:20,150 So here you can see I have declared one today, which is again, these are bank card numbers. 66 00:05:20,660 --> 00:05:26,810 Then I am asking the user to give final numbers, which is which is actually I'm going to put pen. 67 00:05:26,810 --> 00:05:30,670 This might my adding numbers. 68 00:05:30,680 --> 00:05:36,350 I want to get final most from the user and then I have to store that fine. 69 00:05:36,350 --> 00:05:38,430 I'm listening to my body. 70 00:05:38,990 --> 00:05:39,380 OK. 71 00:05:39,570 --> 00:05:40,750 God numbers. 72 00:05:42,150 --> 00:05:44,580 So why we are losing for. 73 00:05:45,050 --> 00:05:52,500 Because I want to get the numbers right, so I am using it for law and specifying that index of that 74 00:05:52,500 --> 00:05:59,160 value, so I start from zero, which means numbers of I hear and I have numbers of eight between us. 75 00:05:59,310 --> 00:06:05,340 Fastest numbers of zero seen and asking for that value, right? 76 00:06:05,460 --> 00:06:06,720 So it will give that. 77 00:06:07,350 --> 00:06:10,920 So first time, this will be no worse off. 78 00:06:12,150 --> 00:06:12,660 Zero. 79 00:06:13,560 --> 00:06:19,170 So whatever number you set us ending, it will be going to that zero. 80 00:06:19,200 --> 00:06:20,240 The position of the. 81 00:06:21,940 --> 00:06:27,730 Then I'm going to increment the value, so it will be a plus plus or I equals a plus one. 82 00:06:28,360 --> 00:06:31,240 This is the shorthand for it, so it will be one. 83 00:06:31,990 --> 00:06:34,570 Then I'm going to check the condition. 84 00:06:34,990 --> 00:06:36,270 So it's one less than five. 85 00:06:36,790 --> 00:06:38,200 Again, no cell. 86 00:06:38,560 --> 00:06:45,520 So no myself one will be asked and I was told that value in the same number of one. 87 00:06:46,240 --> 00:06:48,910 Similarly, this will repeat five times. 88 00:06:49,450 --> 00:06:49,750 Right? 89 00:06:50,350 --> 00:06:53,080 Zero one two three four. 90 00:06:53,230 --> 00:06:59,300 And on each execution of this follow, I would get the position right. 91 00:06:59,350 --> 00:07:02,890 I will get the numbers on each portion of that. 92 00:07:04,550 --> 00:07:12,060 Now they will similarly for branding it instead of seeing the rosy sealed and giving some space. 93 00:07:12,830 --> 00:07:15,290 Let's see how this program will look like. 94 00:07:15,290 --> 00:07:19,040 I think you will you go understanding of this program. 95 00:07:19,970 --> 00:07:23,610 So let us by executing this program first. 96 00:07:23,620 --> 00:07:25,490 Before that, I need to compile that. 97 00:07:26,030 --> 00:07:29,630 So D-plus plus plus I race. 98 00:07:31,610 --> 00:07:34,790 Dot CPB program is right. 99 00:07:34,990 --> 00:07:39,740 No, it's not slash, you know, to get the most. 100 00:07:42,120 --> 00:07:44,190 And the final exam leaving that final. 101 00:07:44,380 --> 00:07:49,160 So now it's on to see, you know what position, so it will be asking tomorrow. 102 00:07:49,710 --> 00:07:53,460 That is fascinating, but I will be giving it also here. 103 00:07:53,470 --> 00:07:54,780 I will be giving it. 104 00:07:55,560 --> 00:07:55,800 Go ahead. 105 00:07:56,430 --> 00:07:56,730 Next. 106 00:07:56,730 --> 00:07:57,120 No. 107 00:07:58,560 --> 00:07:59,300 56. 108 00:07:59,580 --> 00:08:02,220 Next, no contract next, No. 109 00:08:02,490 --> 00:08:03,630 21 next. 110 00:08:03,630 --> 00:08:04,050 No. 111 00:08:04,170 --> 00:08:14,460 40 and giving Lee final boss so one time the slope Mexico to Mexico, to Mexico down for time fighting 112 00:08:14,520 --> 00:08:15,660 executed like this. 113 00:08:16,170 --> 00:08:19,430 Now I will be pressing and see all the. 114 00:08:19,590 --> 00:08:20,530 But I haven't done that. 115 00:08:20,830 --> 00:08:24,510 Display 12:46, 120 140. 116 00:08:25,380 --> 00:08:33,660 Because I'm printing miry numbers over here, which means that all the numbers are having endured here 117 00:08:33,690 --> 00:08:40,190 are stored in the record numbers of eight and 12 are stored in numbers of one nine. 118 00:08:40,680 --> 00:08:44,670 56 was stored in numbers of two zero numbers of zero. 119 00:08:44,670 --> 00:08:48,580 Number of solid numbers of two numbers of three numbers of four. 120 00:08:48,750 --> 00:08:51,090 Likewise have stored all the numbers. 121 00:08:51,240 --> 00:08:58,800 And here, by using the sealed statement, I have navigated using the hollow for each gentlemen of that 122 00:08:58,800 --> 00:09:00,510 eight and a half printer. 123 00:09:00,720 --> 00:09:04,020 So how will you gain access to each and every individual element? 124 00:09:04,020 --> 00:09:09,750 Using follow is what we have discussed in particular program, although you have understood that. 125 00:09:10,290 --> 00:09:16,000 Do let me know in the session comments if you have any kind of doubts over.