title
1.6 Pointers and 2-D Arrays | Two dimensional Array | Data Structures & Algorithm Tutorials

description
In this video, we will see how we can work with 2-D(Two Dimensional) Arrays using Pointers. I have explained how 2D Arrays are organized in Memory and how Pointer Arithmetic and dereferencing can be used to work with 2D Arrays. DSA Full Course: https: https://www.youtube.com/playlist?list=PLdo5W4Nhv31bbKJzrsKfMpo_grxuLl8LU ****************************************** See Complete Playlists: C Programming Course: https://www.youtube.com/playlist?list=PLdo5W4Nhv31a8UcMN9-35ghv8qyFWD9_S C++ Programming: https://www.youtube.com/playlist?list=PLdo5W4Nhv31YU5Wx1dopka58teWP9aCee Python Full Course: https://www.youtube.com/playlist?list=PLdo5W4Nhv31bZSiqiOL5ta39vSnBxpOPT Printing Pattern in C: https://www.youtube.com/playlist?list=PLdo5W4Nhv31Yu1igxTE2x0aeShbKtVcCy DAA Course: https://www.youtube.com/playlist?list=PLdo5W4Nhv31ZTn2P9vF02bkb3SC8uiUUn Placement Series: https://www.youtube.com/playlist?list=PLdo5W4Nhv31YvlDpJhvOYbM9Ap8UypgEy Dynamic Programming: https://www.youtube.com/playlist?list=PLdo5W4Nhv31aBrJE1WS4MR9LRfbmZrAQu Operating Systems: //www.youtube.com/playlist?list=PLdo5W4Nhv31a5ucW_S1K3-x6ztBRD-PNa DBMS: https://www.youtube.com/playlist?list=PLdo5W4Nhv31b33kF46f9aFjoJPOkdlsRc ********************************************** Connect & Contact Me: Facebook: https://www.facebook.com/Jennys-Lectures-CSIT-Netjrf-316814368950701/ Quora: https://www.quora.com/profile/Jayanti-Khatri-Lamba Instagram: https://www.instagram.com/jayantikhatrilamba/

detail
{'title': '1.6 Pointers and 2-D Arrays | Two dimensional Array | Data Structures & Algorithm Tutorials', 'heatmap': [{'end': 1343.485, 'start': 1318.882, 'weight': 1}], 'summary': 'This tutorial on 1.6 pointers and 2-d arrays explores the relationship between 2d arrays and pointers, addressing elements of a 3x3 matrix using pointers, explaining the concept of 2d arrays, and discussing pointer arithmetic in arrays and the manipulation of 2d arrays using pointers.', 'chapters': [{'end': 288.296, 'segs': [{'end': 28.5, 'src': 'embed', 'start': 0.069, 'weight': 0, 'content': [{'end': 4.251, 'text': 'now, see, in this video we will discuss how 2d arrays are related with pointers,', 'start': 0.069, 'duration': 4.182}, {'end': 11.355, 'text': 'how you can access the elements of a 2d array with the help of pointer rather than using the array name.', 'start': 4.251, 'duration': 7.104}, {'end': 15.858, 'text': 'fine, see, we have discussed the relationship between arrays and pointers.', 'start': 11.355, 'duration': 4.503}, {'end': 18.239, 'text': 'i mean that 1d array and pointers.', 'start': 15.858, 'duration': 2.381}, {'end': 24.318, 'text': 'you can check out that video also in that i button fine, Now, see, let us take this.', 'start': 18.239, 'duration': 6.079}, {'end': 24.958, 'text': 'this is 2D array.', 'start': 24.318, 'duration': 0.64}, {'end': 28.5, 'text': 'this is how we are going to declare the 2D array, or you can say that initialize the 2D array.', 'start': 24.958, 'duration': 3.542}], 'summary': 'This video explains the relationship between 2d arrays and pointers for accessing array elements.', 'duration': 28.431, 'max_score': 0.069, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g69.jpg'}, {'end': 97.166, 'src': 'embed', 'start': 70.937, 'weight': 1, 'content': [{'end': 77.767, 'text': 'how see, in this case we are having three arrays, if you see this one, six, two and three.', 'start': 70.937, 'duration': 6.83}, {'end': 79.109, 'text': 'this is what a 1d array.', 'start': 77.767, 'duration': 1.342}, {'end': 86.874, 'text': 'this is another 1d array and this is another 1d array and each 1d array is having three integer elements.', 'start': 79.95, 'duration': 6.924}, {'end': 91.137, 'text': 'fine, and if you combine these three, then it forms a 2d array.', 'start': 86.874, 'duration': 4.263}, {'end': 96.746, 'text': "so you can say the 2d array is what it's an array of arrays.", 'start': 91.137, 'duration': 5.609}, {'end': 97.166, 'text': 'or this?', 'start': 96.746, 'duration': 0.42}], 'summary': 'Three 1d arrays with three integer elements each combine to form a 2d array.', 'duration': 26.229, 'max_score': 70.937, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g70937.jpg'}, {'end': 239.817, 'src': 'embed', 'start': 212.616, 'weight': 2, 'content': [{'end': 215.537, 'text': 'and this is the base address of these arrays.', 'start': 212.616, 'duration': 2.921}, {'end': 220.959, 'text': "fine, so 2d array is what it's an array of arrays.", 'start': 215.537, 'duration': 5.422}, {'end': 222.259, 'text': 'now let us take a pointer.', 'start': 220.959, 'duration': 1.3}, {'end': 224.04, 'text': 'now i have initialized.', 'start': 222.259, 'duration': 1.781}, {'end': 225.22, 'text': 'i have taken a pointer.', 'start': 224.04, 'duration': 1.18}, {'end': 230.176, 'text': 'this is how we are going to declare a pointer variable.', 'start': 227.435, 'duration': 2.741}, {'end': 237.397, 'text': 'this point, this variable, this pointer variable is going to contain address of another variable and the data type of that variable is integer.', 'start': 230.176, 'duration': 7.221}, {'end': 239.817, 'text': 'so it is a pointer to integer.', 'start': 237.397, 'duration': 2.42}], 'summary': 'Introduction to 2d arrays and pointers in c programming.', 'duration': 27.201, 'max_score': 212.616, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g212616.jpg'}], 'start': 0.069, 'title': '2d arrays and pointers', 'summary': 'Explores the relationship between 2d arrays and pointers, demonstrating accessing elements of a 3x3 matrix using pointers, and explains the concept of 2d arrays as an array of arrays with three integer elements.', 'chapters': [{'end': 70.937, 'start': 0.069, 'title': '2d arrays and pointers', 'summary': 'Explores the relationship between 2d arrays and pointers, demonstrating how to access elements of a 3x3 matrix using pointers instead of array names, and discussing the logical and memory representation of the array.', 'duration': 70.868, 'highlights': ['The logical and memory representation of the 3x3 matrix or 2D array is explained, with 3 rows and 3 columns each, containing specific values.', 'Demonstrating how to access elements of a 2D array using pointers instead of array names.']}, {'end': 161.398, 'start': 70.937, 'title': 'Understanding 2d arrays', 'summary': 'Explains the concept of 2d arrays as an array of arrays, with each 1d array containing three integer elements, forming a 2d array of three 1d arrays.', 'duration': 90.461, 'highlights': ['2D arrays are formed by combining multiple 1D arrays, and in this case, the 2D array is an array of three 1D arrays, each containing three integer elements.', 'Each 1D array within the 2D array is named A0, A1, and A2, and they each contain 3 integer values.', 'The concept of accessing elements within the 2D array is explained, with the example of accessing the first element of A0 as a 1D array.']}, {'end': 288.296, 'start': 161.398, 'title': 'Understanding arrays and pointers', 'summary': 'Explains the relationship between array names and their base addresses, the concept of 2d arrays as an array of arrays, and the declaration and initialization of pointer variables, highlighting the significance of array names returning the pointer to their first element and the distinction between 1d and 2d arrays.', 'duration': 126.898, 'highlights': ["The name of an array contains the base address of its first element, with 'a of 0' indicating the value 100 at the first address, and 'a of 1' representing a 1D array.", '2D arrays are arrays of arrays, with the base address of the array being the pointer to its first element, comprising three 1D arrays.', 'The declaration and initialization of a pointer variable involves defining a variable that contains the address of another variable, with the data type being integer, and the pointer to the first element of an array is returned when the array name is referenced.']}], 'duration': 288.227, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g69.jpg', 'highlights': ['Demonstrating how to access elements of a 2D array using pointers instead of array names.', '2D arrays are formed by combining multiple 1D arrays, and in this case, the 2D array is an array of three 1D arrays, each containing three integer elements.', 'The declaration and initialization of a pointer variable involves defining a variable that contains the address of another variable, with the data type being integer, and the pointer to the first element of an array is returned when the array name is referenced.']}, {'end': 470.24, 'segs': [{'end': 441.66, 'src': 'embed', 'start': 364.064, 'weight': 0, 'content': [{'end': 371.387, 'text': 'so if you write the name of this array, the name of the array, name of the array, what name of the array always returns,', 'start': 364.064, 'duration': 7.323}, {'end': 375.968, 'text': 'what pointer to its first variable?', 'start': 371.387, 'duration': 4.581}, {'end': 380.373, 'text': 'fine. or you can say address of its first variable, fine.', 'start': 375.968, 'duration': 4.405}, {'end': 383.175, 'text': 'so it will point to here.', 'start': 380.373, 'duration': 2.802}, {'end': 388.498, 'text': 'if you write name of there, it will point to here address of its point to its first integer variable.', 'start': 383.175, 'duration': 5.323}, {'end': 391.539, 'text': 'and 6 is what integer variable it will return 100.', 'start': 388.498, 'duration': 3.041}, {'end': 399.063, 'text': 'so 100 will be stored at in this pointer, because pointer can contain address of another integer variable.', 'start': 391.539, 'duration': 7.524}, {'end': 399.823, 'text': 'so this is fine.', 'start': 399.063, 'duration': 0.76}, {'end': 401.684, 'text': 'you can write this thing.', 'start': 399.823, 'duration': 1.861}, {'end': 408.154, 'text': 'fine, but you cannot write p is equal to a of 0 and 0.', 'start': 401.684, 'duration': 6.47}, {'end': 408.614, 'text': 'why so?', 'start': 408.154, 'duration': 0.46}, {'end': 410.156, 'text': 'because a of 0 and 0.', 'start': 408.614, 'duration': 1.542}, {'end': 412.278, 'text': 'it means it will return what value.', 'start': 410.156, 'duration': 2.122}, {'end': 415.46, 'text': 'that is 6, but pointer cannot contain a value.', 'start': 412.278, 'duration': 3.182}, {'end': 418.623, 'text': 'so this is invalid, right.', 'start': 415.46, 'duration': 3.163}, {'end': 420.765, 'text': 'so you cannot write this thing.', 'start': 418.623, 'duration': 2.142}, {'end': 425.97, 'text': 'so now, if you want to print the address of this 2d array, that is this base address, that is 100.', 'start': 420.765, 'duration': 5.205}, {'end': 427.511, 'text': 'i have taken 100 here.', 'start': 425.97, 'duration': 1.541}, {'end': 432.015, 'text': 'fine. so if you want to print in hexadecimal form, you can write down percentage p.', 'start': 427.511, 'duration': 4.504}, {'end': 433.756, 'text': 'otherwise you can write down percentage u.', 'start': 432.015, 'duration': 1.741}, {'end': 440.079, 'text': 'fine, it will print in unsigned integer, some integer value.', 'start': 435.496, 'duration': 4.583}, {'end': 441.66, 'text': 'so you can print.', 'start': 440.079, 'duration': 1.581}], 'summary': 'Explanation of array pointers and addressing with an example of a 2d array, with a base address of 100.', 'duration': 77.596, 'max_score': 364.064, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g364064.jpg'}], 'start': 288.296, 'title': 'Pointers and 2d array address in c', 'summary': 'Explains the relationship between pointers and arrays in c, highlighting the concept of pointers returning the address of the first element in an array and the limitations on assigning values to pointers. it also discusses printing the address of a 2d array, illustrating that it can be printed in hexadecimal or unsigned integer form, and explaining the process of using printf to print the address stored in a pointer in memory.', 'chapters': [{'end': 420.765, 'start': 288.296, 'title': 'Understanding pointers in c', 'summary': 'Explains the relationship between pointers and arrays in c, highlighting the concept of pointers returning the address of the first element in an array and the limitations on assigning values to pointers.', 'duration': 132.469, 'highlights': ["The name of an array always returns a pointer to its first variable, such as 'A' pointing to the address of the first integer variable, illustrated by 'A of 0' returning 100.", "Explaining the invalidity of assigning the value 6 to a pointer, as pointers can only contain the address of a variable, exemplified by 'P = A of 0 and 0' being invalid.", "Clarification on the invalidity of assigning the value 6 to a pointer, as pointers can only contain the address of a variable, exemplified by 'A of 0 and 0' returning 6, which is not permissible for a pointer."]}, {'end': 470.24, 'start': 420.765, 'title': 'Printing 2d array address', 'summary': 'Discusses printing the address of a 2d array, illustrating that it can be printed in hexadecimal or unsigned integer form, and explaining the process of using printf to print the address stored in a pointer in memory.', 'duration': 49.475, 'highlights': ['Explaining how to print the address of a 2D array in hexadecimal form using %p and in unsigned integer form using %u.', 'Describing the process of using printf to print the address stored in a pointer in memory.']}], 'duration': 181.944, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g288296.jpg', 'highlights': ["The name of an array always returns a pointer to its first variable, such as 'A' pointing to the address of the first integer variable, illustrated by 'A of 0' returning 100.", 'Explaining how to print the address of a 2D array in hexadecimal form using %p and in unsigned integer form using %u.', "Explaining the invalidity of assigning the value 6 to a pointer, as pointers can only contain the address of a variable, exemplified by 'P = A of 0 and 0' being invalid."]}, {'end': 789.531, 'segs': [{'end': 551.935, 'src': 'embed', 'start': 470.24, 'weight': 0, 'content': [{'end': 475.222, 'text': 'so this p is now going to store address of a of 0, 0, that is 100.', 'start': 470.24, 'duration': 4.982}, {'end': 477.843, 'text': 'so now p is going to point here.', 'start': 475.222, 'duration': 2.621}, {'end': 480.724, 'text': 'so if you will print this p, then 100 would be printed.', 'start': 477.843, 'duration': 2.881}, {'end': 488.187, 'text': 'fine. or rather than p, you can write what a, simply the name of the array, so the name of the array, 2d array.', 'start': 480.724, 'duration': 7.463}, {'end': 491.584, 'text': 'it will give what the address of the first element.', 'start': 488.187, 'duration': 3.397}, {'end': 496.707, 'text': 'first element is what A and the address of A is what 100.', 'start': 491.584, 'duration': 5.123}, {'end': 497.988, 'text': 'only fine.', 'start': 496.707, 'duration': 1.281}, {'end': 500.449, 'text': 'you can say that base address of this is what 100.', 'start': 497.988, 'duration': 2.461}, {'end': 502.03, 'text': 'so it will print 100.', 'start': 500.449, 'duration': 1.581}, {'end': 507.494, 'text': 'or you can write address of A.', 'start': 502.03, 'duration': 5.464}, {'end': 510.155, 'text': 'this will also print 100, fine.', 'start': 507.494, 'duration': 2.661}, {'end': 518.868, 'text': 'or you can write address of A, address of a means, a means.', 'start': 510.155, 'duration': 8.713}, {'end': 521.909, 'text': 'this array name, complete array name, address of a means.', 'start': 518.868, 'duration': 3.041}, {'end': 526.975, 'text': 'it will give points to the address base address of the complete array.', 'start': 521.909, 'duration': 5.066}, {'end': 528.936, 'text': 'the whole array base address is what hundred.', 'start': 526.975, 'duration': 1.961}, {'end': 530.478, 'text': 'so it will print hundred.', 'start': 528.936, 'duration': 1.542}, {'end': 532.8, 'text': 'or you can write asterisk a.', 'start': 530.478, 'duration': 2.322}, {'end': 540.626, 'text': 'now how asterisk a will print 100, because asterisk means dereferencing operator and it will print what the value at that address.', 'start': 533.84, 'duration': 6.786}, {'end': 545.229, 'text': 'now see, if you write simple a, it means it will return what array name is a.', 'start': 540.626, 'duration': 4.603}, {'end': 548.452, 'text': 'it will return what that pointer to its first element.', 'start': 545.229, 'duration': 3.223}, {'end': 551.935, 'text': 'or you can say that address of its first element.', 'start': 548.452, 'duration': 3.483}], 'summary': "Pointer p stores the address of array a's first element, which is 100.", 'duration': 81.695, 'max_score': 470.24, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g470240.jpg'}, {'end': 628.36, 'src': 'embed', 'start': 571.59, 'weight': 3, 'content': [{'end': 580.456, 'text': 'it is returning either 6, 2 or 5, because at a of 0 at this address it will return at this element the complete 1d array.', 'start': 571.59, 'duration': 8.866}, {'end': 584.499, 'text': 'fine, so it will return what this this base address of this one.', 'start': 580.456, 'duration': 4.043}, {'end': 589.445, 'text': 'that is 100, 100, a of 0 contains what 100.', 'start': 584.499, 'duration': 4.946}, {'end': 591.746, 'text': 'fine, so it will return 100.', 'start': 589.445, 'duration': 2.301}, {'end': 596.59, 'text': 'or you can write a of 0.', 'start': 591.746, 'duration': 4.844}, {'end': 602.313, 'text': 'this will also return what 100, because a of 0 means a of 0.', 'start': 596.59, 'duration': 5.723}, {'end': 604.475, 'text': 'that is name of the array.', 'start': 602.313, 'duration': 2.162}, {'end': 608.357, 'text': 'this. this a of 0 means this name of this complete array, 1d array.', 'start': 604.475, 'duration': 3.882}, {'end': 609.158, 'text': 'name of the array.', 'start': 608.357, 'duration': 0.801}, {'end': 616.252, 'text': 'if you write down name of the array that that will return, what address of the first element in this array means?', 'start': 610.188, 'duration': 6.064}, {'end': 618.013, 'text': 'the first element in this array is 6.', 'start': 616.252, 'duration': 1.761}, {'end': 618.434, 'text': 'address is 100.', 'start': 618.013, 'duration': 0.421}, {'end': 621.035, 'text': 'so it will return 100.', 'start': 618.434, 'duration': 2.601}, {'end': 628.36, 'text': 'fine, although this a and address of a is returning the same value, but they are different.', 'start': 621.035, 'duration': 7.325}], 'summary': 'The array will return either 6, 2, or 5 at different addresses, with the first element at address 100.', 'duration': 56.77, 'max_score': 571.59, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g571590.jpg'}, {'end': 680.11, 'src': 'embed', 'start': 652.503, 'weight': 4, 'content': [{'end': 658.729, 'text': 'that is, it is going to return a pointer to to this one and if you add in a pointer, if you add plus one,', 'start': 652.503, 'duration': 6.226}, {'end': 666.045, 'text': 'it means it is going to point to the next variable that we have discussed in 1D array also.', 'start': 658.729, 'duration': 7.316}, {'end': 668.227, 'text': 'so it will point here.', 'start': 666.045, 'duration': 2.182}, {'end': 670.85, 'text': 'next variable in this is complete 1D array.', 'start': 668.227, 'duration': 2.623}, {'end': 674.993, 'text': 'that is this a of 1 right now.', 'start': 670.85, 'duration': 4.143}, {'end': 680.11, 'text': 'it is going to point here now what what it will return.', 'start': 676.167, 'duration': 3.943}], 'summary': 'Explains how pointers work in 1d arrays and their relationship to variables.', 'duration': 27.607, 'max_score': 652.503, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g652503.jpg'}], 'start': 470.24, 'title': 'Array and 2d array pointers', 'summary': 'Explains array pointers storing and accessing addresses, with the base address at 100, and demonstrates how the dereferencing operator prints values at the given address. it also highlights 2d array pointers, clarifying the difference between array names and addresses, demonstrating pointer arithmetic, and explaining the value and address return of array elements.', 'chapters': [{'end': 551.935, 'start': 470.24, 'title': 'Array pointers and addresses', 'summary': 'Explains how array pointers store and access addresses, with the base address being 100, and how dereferencing operator prints the value at the given address.', 'duration': 81.695, 'highlights': ["Array pointer 'p' stores the address of the first element of the 2D array, pointing to 100. The pointer 'p' now stores the address 100, pointing to the first element of the 2D array.", "The base address of the array is 100, which can be printed using 'p' or 'address of A'. The base address of the array is 100, which can be printed using 'p' or 'address of A'.", "Dereferencing operator '*' prints the value at the address, so '*a' prints 100. The dereferencing operator '*' prints the value at the address, hence '*a' prints 100."]}, {'end': 789.531, 'start': 551.935, 'title': 'Understanding 2d array pointers', 'summary': 'Explains 2d array pointers, highlighting the difference between the array name and address, demonstrating pointer arithmetic, and clarifying the value and address return of array elements.', 'duration': 237.596, 'highlights': ['The chapter explains the difference between the array name and address, clarifying that although they may return the same value, they are different (e.g., a and &a).', 'It demonstrates pointer arithmetic, showing how adding 1 to a pointer points to the next element in the array, clarifying the concept with specific examples (e.g., a + 1).', 'The chapter clarifies the return of the base address of the first element in the array using examples, such as a of 0 returning 100 and a of 1 returning 112.']}], 'duration': 319.291, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g470240.jpg', 'highlights': ["Array pointer 'p' stores the address of the first element of the 2D array, pointing to 100.", "The base address of the array is 100, which can be printed using 'p' or 'address of A'.", "Dereferencing operator '*' prints the value at the address, so '*a' prints 100.", 'The chapter explains the difference between the array name and address, clarifying that although they may return the same value, they are different (e.g., a and &a).', 'It demonstrates pointer arithmetic, showing how adding 1 to a pointer points to the next element in the array, clarifying the concept with specific examples (e.g., a + 1).', 'The chapter clarifies the return of the base address of the first element in the array using examples, such as a of 0 returning 100 and a of 1 returning 112.']}, {'end': 939.416, 'segs': [{'end': 892.003, 'src': 'embed', 'start': 842.581, 'weight': 0, 'content': [{'end': 849.305, 'text': 'is this one second row, but index is 1 and column is 0, and address of this one is 112.', 'start': 842.581, 'duration': 6.724}, {'end': 850.947, 'text': 'so it is going to return 112 only.', 'start': 849.305, 'duration': 1.642}, {'end': 852.808, 'text': 'this is also same.', 'start': 850.947, 'duration': 1.861}, {'end': 862.765, 'text': 'fine. now, if you write asterisk a plus 1 plus suppose 2.', 'start': 852.808, 'duration': 9.957}, {'end': 866.647, 'text': 'now what it is going to print now see asterisk a plus 1.', 'start': 862.765, 'duration': 3.882}, {'end': 868.989, 'text': 'a is going to return what.', 'start': 866.647, 'duration': 2.342}, {'end': 871.671, 'text': 'this the address of first element, first element.', 'start': 868.989, 'duration': 2.682}, {'end': 873.432, 'text': 'is this complete array.', 'start': 871.671, 'duration': 1.761}, {'end': 878.335, 'text': 'if you add plus 1 here, then it is going to point to the next element in this array.', 'start': 873.432, 'duration': 4.903}, {'end': 882.417, 'text': 'next element is also a complete 1d array and asterisk.', 'start': 878.335, 'duration': 4.082}, {'end': 885.059, 'text': 'this means it is going to return this complete 1d array.', 'start': 882.417, 'duration': 2.642}, {'end': 886.74, 'text': 'value is complete 1d array.', 'start': 885.059, 'duration': 1.681}, {'end': 890.022, 'text': 'so this you can say the base address of your address of this first element.', 'start': 886.74, 'duration': 3.282}, {'end': 892.003, 'text': 'that is 1, 1, 2.', 'start': 890.022, 'duration': 1.981}], 'summary': 'The address and values of array elements are explained using asterisk notation.', 'duration': 49.422, 'max_score': 842.581, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g842581.jpg'}, {'end': 946.142, 'src': 'embed', 'start': 920.754, 'weight': 2, 'content': [{'end': 926.306, 'text': 'so if you, you are going to print this value, then simply you can write Say this one.', 'start': 920.754, 'duration': 5.552}, {'end': 927.026, 'text': 'this is same.', 'start': 926.306, 'duration': 0.72}, {'end': 930.489, 'text': 'this is going to give you 120 and value at 120.', 'start': 927.026, 'duration': 3.463}, {'end': 933.211, 'text': 'if you want to print, then just do a again.', 'start': 930.489, 'duration': 2.722}, {'end': 934.592, 'text': 'write a dereferencing operator.', 'start': 933.211, 'duration': 1.381}, {'end': 937.775, 'text': 'So it is going to print the value that is 3.', 'start': 934.993, 'duration': 2.782}, {'end': 939.416, 'text': 'So you can say it is a double pointer.', 'start': 937.775, 'duration': 1.641}, {'end': 944.22, 'text': 'You can implement, you can also declare a double pointer and you can implement this 2D array.', 'start': 939.436, 'duration': 4.784}, {'end': 946.142, 'text': 'Fine Now see.', 'start': 944.721, 'duration': 1.421}], 'summary': 'The transcript discusses dereferencing operator, double pointers, and 2d arrays implementation.', 'duration': 25.388, 'max_score': 920.754, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g920754.jpg'}], 'start': 789.531, 'title': 'Pointer arithmetic in arrays', 'summary': 'Discusses pointer arithmetic in arrays, showcasing how to access specific elements and their values using base address and pointer arithmetic, with examples illustrating memory addresses and values in an array.', 'chapters': [{'end': 939.416, 'start': 789.531, 'title': 'Pointer arithmetic in arrays', 'summary': 'Discusses pointer arithmetic in arrays, demonstrating how to access specific elements and their values using base address and pointer arithmetic, with examples showing memory addresses and values in an array.', 'duration': 149.885, 'highlights': ['Pointer arithmetic in arrays, showing how to access specific elements and their values using base address and pointer arithmetic.', 'Demonstrates examples of memory addresses and values in an array, such as returning the address of the first element (112) and accessing the value at a specific memory address (120).', 'Explains the concept of dereferencing operator to access and print the value at a specific memory address in the array.']}], 'duration': 149.885, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g789531.jpg', 'highlights': ['Demonstrates examples of memory addresses and values in an array, such as returning the address of the first element (112) and accessing the value at a specific memory address (120).', 'Pointer arithmetic in arrays, showing how to access specific elements and their values using base address and pointer arithmetic.', 'Explains the concept of dereferencing operator to access and print the value at a specific memory address in the array.']}, {'end': 1179.008, 'segs': [{'end': 1030.085, 'src': 'embed', 'start': 1003.53, 'weight': 0, 'content': [{'end': 1007.813, 'text': 'See this is how we are going to access a of i and j the value of 2D array.', 'start': 1003.53, 'duration': 4.283}, {'end': 1021.203, 'text': 'So if you want to write this in the form of pointer then how you can write you can write here asterisk again asterisk a plus i plus j.', 'start': 1008.193, 'duration': 13.01}, {'end': 1023.605, 'text': 'This is same a of i j is equal to this one.', 'start': 1021.203, 'duration': 2.402}, {'end': 1030.085, 'text': 'right. or if you want to use the pointer, then this pointer is also going to store this base address to.', 'start': 1024.723, 'duration': 5.362}], 'summary': 'Access 2d array using pointers, a[i][j] = *(*(a + i) + j)', 'duration': 26.555, 'max_score': 1003.53, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g1003530.jpg'}, {'end': 1148.178, 'src': 'embed', 'start': 1095.841, 'weight': 3, 'content': [{'end': 1097.782, 'text': 'just think about it.', 'start': 1095.841, 'duration': 1.941}, {'end': 1103.047, 'text': 'see asterisk a here, step by step, we are going to solve this.', 'start': 1097.782, 'duration': 5.265}, {'end': 1104.668, 'text': 'a, a means.', 'start': 1103.047, 'duration': 1.621}, {'end': 1107.35, 'text': 'it is going to return a is name of 2d array.', 'start': 1104.668, 'duration': 2.682}, {'end': 1115.087, 'text': 'so it is going to return what if you write down name of an array, so it is going to return pointer to its first element.', 'start': 1107.35, 'duration': 7.737}, {'end': 1118.689, 'text': 'or you can say address of its first element, first element in 2d array.', 'start': 1115.087, 'duration': 3.602}, {'end': 1121.21, 'text': 'is this complete 1d array, fine.', 'start': 1118.689, 'duration': 2.521}, {'end': 1125.912, 'text': 'so it is going to return pointer to this 1d array, fine.', 'start': 1121.21, 'duration': 4.702}, {'end': 1134.91, 'text': 'or you can say this address of this 1d array now asterisk, a, asterisk, a means, value at this address.', 'start': 1125.912, 'duration': 8.998}, {'end': 1136.511, 'text': 'value is what value?', 'start': 1134.91, 'duration': 1.601}, {'end': 1139.293, 'text': 'is this complete one d array, fine.', 'start': 1136.511, 'duration': 2.782}, {'end': 1143.935, 'text': 'or you can say that base address of this address of its first element, that is hundred.', 'start': 1139.293, 'duration': 4.642}, {'end': 1148.178, 'text': 'it is going to return value at a of zero is what hundred it is going to return.', 'start': 1143.935, 'duration': 4.243}], 'summary': 'Explanation of pointers and array manipulation in 2d arrays.', 'duration': 52.337, 'max_score': 1095.841, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g1095841.jpg'}], 'start': 939.436, 'title': 'Pointers in 2d arrays', 'summary': 'Discusses accessing and manipulating 2d arrays using pointers, highlighting various methods and the concept of pointer addresses with their corresponding values.', 'chapters': [{'end': 1095.841, 'start': 939.436, 'title': 'Accessing 2d arrays using pointers', 'summary': 'Explains how to access and manipulate 2d arrays using pointers, demonstrating various methods to print and access values, highlighting the flexibility and equivalence of different expressions in accessing the array elements.', 'duration': 156.405, 'highlights': ['The chapter demonstrates accessing and printing values of a 2D array using pointer notation, showcasing how to access specific elements using row and column indices and highlighting the equivalence of different pointer expressions.', 'The speaker illustrates the flexibility of accessing 2D array values by using different pointer notations, emphasizing the equivalence of expressions such as asterisk a plus i plus j and a of i j, showcasing the various methods of accessing the array elements.', 'The chapter explains the equivalence of using pointers to access 2D array elements, showcasing the interchangeability of pointers and array notation to access and manipulate array values.']}, {'end': 1179.008, 'start': 1095.841, 'title': 'Understanding pointers in 2d arrays', 'summary': 'Explains the concept of pointers in 2d arrays, demonstrating the step-by-step process of accessing and manipulating elements, including the return of pointer addresses and their corresponding values.', 'duration': 83.167, 'highlights': ["The 'asterisk a' notation returns the pointer to the first element of the 2D array, for example, returning the address '100' when accessing the first element.", "Understanding the 'asterisk, a, asterisk, a' notation, which points to the value at a specific address, allowing for the retrieval of the corresponding element value, such as '100' for a[0] and '104' for a[1]."]}], 'duration': 239.572, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g939436.jpg', 'highlights': ['The chapter demonstrates accessing and printing values of a 2D array using pointer notation, showcasing how to access specific elements using row and column indices and highlighting the equivalence of different pointer expressions.', 'The chapter explains the equivalence of using pointers to access 2D array elements, showcasing the interchangeability of pointers and array notation to access and manipulate array values.', 'The speaker illustrates the flexibility of accessing 2D array values by using different pointer notations, emphasizing the equivalence of expressions such as asterisk a plus i plus j and a of i j, showcasing the various methods of accessing the array elements.', "Understanding the 'asterisk, a, asterisk, a' notation, which points to the value at a specific address, allowing for the retrieval of the corresponding element value, such as '100' for a[0] and '104' for a[1].", "The 'asterisk a' notation returns the pointer to the first element of the 2D array, for example, returning the address '100' when accessing the first element."]}, {'end': 1488.068, 'segs': [{'end': 1266.468, 'src': 'embed', 'start': 1236.421, 'weight': 0, 'content': [{'end': 1240.524, 'text': 'it is going to return 1, 1 in this one.', 'start': 1236.421, 'duration': 4.103}, {'end': 1245.668, 'text': 'if you add 1, then it is going to point to the obviously the next variable.', 'start': 1240.524, 'duration': 5.144}, {'end': 1250.272, 'text': 'sorry, the next value, so that is it is going to point here.', 'start': 1245.668, 'duration': 4.604}, {'end': 1252.954, 'text': 'it means it becomes 116.', 'start': 1250.272, 'duration': 2.682}, {'end': 1256.777, 'text': 'fine, now, what is the value of this address of a of 1 plus 1?', 'start': 1252.954, 'duration': 3.823}, {'end': 1259.259, 'text': 'see address of 1.', 'start': 1256.777, 'duration': 2.482}, {'end': 1266.468, 'text': 'if you print a of 1 and address of a of 1, both will return what this 112.', 'start': 1259.259, 'duration': 7.209}], 'summary': 'The transcript involves manipulating variables and addresses, resulting in values such as 1, 116, and 112.', 'duration': 30.047, 'max_score': 1236.421, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g1236421.jpg'}, {'end': 1343.485, 'src': 'heatmap', 'start': 1318.882, 'weight': 2, 'content': [{'end': 1326.59, 'text': 'name of the array means it is going to give you the pointer to its first value.', 'start': 1318.882, 'duration': 7.708}, {'end': 1332.339, 'text': 'or you can say it is going to give you the address of the first element of the array.', 'start': 1326.59, 'duration': 5.749}, {'end': 1335.961, 'text': 'so first element of the array, first element of the array, address, is 200.', 'start': 1332.339, 'duration': 3.622}, {'end': 1343.485, 'text': 'that is why it is going to give 200, fine, and address of a address of a means.', 'start': 1335.961, 'duration': 7.524}], 'summary': 'Array name gives address of first element, like 200.', 'duration': 24.603, 'max_score': 1318.882, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g1318882.jpg'}, {'end': 1427.54, 'src': 'embed', 'start': 1397.895, 'weight': 1, 'content': [{'end': 1399.156, 'text': 'so 3 into 4.', 'start': 1397.895, 'duration': 1.261}, {'end': 1406.201, 'text': 'that is, it is going to add 12 bytes because it is going to give you the address of the complete array.', 'start': 1399.156, 'duration': 7.045}, {'end': 1413.106, 'text': 'so now, in this case it is going to point here, after this complete array, here the next part.', 'start': 1406.201, 'duration': 6.905}, {'end': 1415.788, 'text': 'so it means you can say this plus 12.', 'start': 1413.106, 'duration': 2.682}, {'end': 1417.169, 'text': 'that is 2, 1, 2.', 'start': 1415.788, 'duration': 1.381}, {'end': 1419.473, 'text': 'it is going to give you 2, 1, 2.', 'start': 1417.169, 'duration': 2.304}, {'end': 1421.976, 'text': 'same in this case a1 plus 1.', 'start': 1419.474, 'duration': 2.502}, {'end': 1423.037, 'text': 'that is 116.', 'start': 1421.976, 'duration': 1.061}, {'end': 1424.638, 'text': 'now, address of a1 plus 1.', 'start': 1423.037, 'duration': 1.601}, {'end': 1426.139, 'text': 'address of a1.', 'start': 1424.638, 'duration': 1.501}, {'end': 1427.54, 'text': 'a1 means this.', 'start': 1426.139, 'duration': 1.401}], 'summary': 'Pointer arithmetic adds 12 bytes to array addresses, resulting in specific memory locations.', 'duration': 29.645, 'max_score': 1397.895, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g1397895.jpg'}], 'start': 1179.008, 'title': 'Pointer and array arithmetic in c', 'summary': 'Covers pointer arithmetic, 1d array addresses, and understanding memory addresses in c, with specific examples and explanations.', 'chapters': [{'end': 1266.468, 'start': 1179.008, 'title': 'Pointer arithmetic in c', 'summary': 'Discusses pointer arithmetic in c, including printing values of variables, pointer arithmetic, and understanding memory addresses.', 'duration': 87.46, 'highlights': ['Printing asterisk a and asterisk asterisk a would output the values of the variables a and p respectively.', 'Understanding pointer arithmetic, adding 1 to the address of a[1] would point to the next variable, resulting in 116.', 'Explaining that the address of a[1] plus 1 would return the value 112.']}, {'end': 1343.485, 'start': 1266.468, 'title': 'Understanding 1d array addresses', 'summary': 'Discusses the difference between the name of an array and the address of an array in the context of a 1d array, emphasizing that the name of the array returns the address of its first element, while the address of the array returns the base address.', 'duration': 77.017, 'highlights': ['The name of the array returns the address of its first element, while the address of the array returns the base address.', 'Illustrating that the name of the array and the address of the array may appear the same, but they are different, as the former returns the pointer to the first value while the latter returns the base address.', 'Explaining that when printing the name of the array and the address of the array, both will return the base address, and the base address plus 1 will not return the same value as the name of the array plus 1.']}, {'end': 1488.068, 'start': 1343.485, 'title': 'Understanding pointer arithmetic', 'summary': "Explains pointer arithmetic and how adding 1 to a pointer affects the address, with specific examples of a 1d array and its elements' addresses.", 'duration': 144.583, 'highlights': ['When adding 1 to a pointer, it points to the next element in the array, resulting in an address change from 200 to 204 for a complete array.', 'Pointer arithmetic in a 1D array involves adding 12 bytes when incrementing by 1, resulting in an address change from 112 to 124 for the next element.', 'The size of the array (3 elements) and the size of each element (4 bytes) are used to calculate the byte addition in pointer arithmetic.']}], 'duration': 309.06, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/tw-qWGG8y5g/pics/tw-qWGG8y5g1179008.jpg', 'highlights': ['Adding 1 to the address of a[1] would point to the next variable, resulting in 116.', 'Pointer arithmetic in a 1D array involves adding 12 bytes when incrementing by 1, resulting in an address change from 112 to 124 for the next element.', 'The name of the array returns the address of its first element, while the address of the array returns the base address.']}], 'highlights': ['The chapter demonstrates accessing and printing values of a 2D array using pointer notation, showcasing how to access specific elements using row and column indices and highlighting the equivalence of different pointer expressions.', 'The chapter explains the equivalence of using pointers to access 2D array elements, showcasing the interchangeability of pointers and array notation to access and manipulate array values.', 'The speaker illustrates the flexibility of accessing 2D array values by using different pointer notations, emphasizing the equivalence of expressions such as asterisk a plus i plus j and a of i j, showcasing the various methods of accessing the array elements.', "Understanding the 'asterisk, a, asterisk, a' notation, which points to the value at a specific address, allowing for the retrieval of the corresponding element value, such as '100' for a[0] and '104' for a[1].", "The 'asterisk a' notation returns the pointer to the first element of the 2D array, for example, returning the address '100' when accessing the first element.", "Array pointer 'p' stores the address of the first element of the 2D array, pointing to 100.", "The base address of the array is 100, which can be printed using 'p' or 'address of A'.", "Dereferencing operator '*' prints the value at the address, so '*a' prints 100.", 'The chapter explains the difference between the array name and address, clarifying that although they may return the same value, they are different (e.g., a and &a).', 'It demonstrates pointer arithmetic, showing how adding 1 to a pointer points to the next element in the array, clarifying the concept with specific examples (e.g., a + 1).', 'The chapter clarifies the return of the base address of the first element in the array using examples, such as a of 0 returning 100 and a of 1 returning 112.', 'Adding 1 to the address of a[1] would point to the next variable, resulting in 116.', 'Pointer arithmetic in a 1D array involves adding 12 bytes when incrementing by 1, resulting in an address change from 112 to 124 for the next element.', "The name of an array always returns a pointer to its first variable, such as 'A' pointing to the address of the first integer variable, illustrated by 'A of 0' returning 100.", 'Explaining how to print the address of a 2D array in hexadecimal form using %p and in unsigned integer form using %u.', "Explaining the invalidity of assigning the value 6 to a pointer, as pointers can only contain the address of a variable, exemplified by 'P = A of 0 and 0' being invalid.", 'Demonstrates examples of memory addresses and values in an array, such as returning the address of the first element (112) and accessing the value at a specific memory address (120).', 'Pointer arithmetic in arrays, showing how to access specific elements and their values using base address and pointer arithmetic.', 'Explains the concept of dereferencing operator to access and print the value at a specific memory address in the array.', 'Demonstrating how to access elements of a 2D array using pointers instead of array names.', '2D arrays are formed by combining multiple 1D arrays, and in this case, the 2D array is an array of three 1D arrays, each containing three integer elements.', 'The declaration and initialization of a pointer variable involves defining a variable that contains the address of another variable, with the data type being integer, and the pointer to the first element of an array is returned when the array name is referenced.']}