Demonstration Program of 2 dimension Array and Pointers | Data Structure Using C

TL;DR
Learn how to use two-dimensional arrays and pointers in a simple program quiz.
Transcript
hello dear students let's revise the concept of two-dimensional array and pointers using a very simple program in fact it's like a quiz now you can see that in this program we have declared a two dimensional array containing three rows and three columns named as a and i have initialized it such that row 0 will store 10 20 30 correct 3 values row 1 ... Read More
Key Insights
- ❓ Two-dimensional arrays are collections of one-dimensional arrays.
- ⚾ Base addresses can be obtained by using the notation "a0" or "a[i]".
- ❓ The notation "a[i][j]" is equivalent to "(a+i)+j" or "(a[i]+j)".
- ♿ Accessing values in a two-dimensional array can be done using double asterisks with "a" or "a[i][j]".
Install to Summarize YouTube Videos and Get Transcripts
Explore YouTube Video Summarizer or Get YouTube Transcript Extractor
Questions & Answers
Q: Why are addresses printed using "%u" instead of "%d"?
Addresses are unsigned and cannot be negative, so "%u" is used. It denotes that the value being printed is an address and will always be positive.
Q: What is the base address of the zeroth one-dimensional array?
The base address of the zeroth one-dimensional array is 100.
Q: How can we access the value at the second row and first column?
We can access this value using the notation "a[2][1]" or "*(a+2)+1". Both notations will give us the value stored at the second row, first column.
Q: What does simply using the name "a" represent?
Using the name "a" represents the base address of the zeroth row in the two-dimensional array.
Summary & Key Takeaways
-
The content explains the initialization of a three by three matrix using a two-dimensional array, with each row containing three values.
-
It discusses the concept of base addresses for one-dimensional arrays within the two-dimensional array.
-
The video demonstrates various notations and their equivalence in accessing values and addresses within the array.
Read in Other Languages (beta)
Share This Summary 📚
Summarize YouTube Videos and Get Video Transcripts with 1-Click
Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator
Explore More Summaries from Ekeeda 📚






Summarize YouTube Videos and Get Video Transcripts with 1-Click
Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator