#20 C Multidimensional Arrays | C Programming For Beginners
Вставка
- Опубліковано 8 лип 2024
- #20 C Multidimensional Arrays | C Programming For Beginners
In this video, we will learn to work with multidimensional arrays. We will start by understanding the declaration, initialization, and accessing each element of a multidimensional array. Then, we will try out many examples like matrix multiplication programs to make the concept clearer. So, watch the video till the end to have a better understanding.
This video is a part of our C Programming video series: • #1: Getting Started wi...
~
Resources:
C Online Compiler: www.programiz.com/c-programmi...
Github File: github.com/programiz/c-youtub...
C (title) Tutorial (text-based tutorial): www.programiz.com/c-programmi...
Timestamps:
00:00 Start
00:20 C Multidimensional Arrays
00:39 Declaration multidimensional array
01:17 Initialization of multidimensional array
02:49 Access Array Elements
04:57 Change Array Indexes
06:56 Multidimensional Array and for loop
10:14 Quiz
~
Revise your learning using our C App
Download here for Android: bit.ly/3upaInx
Download here for iOS: apple.co/3EZLtNq
Find Programiz elsewhere:
Programiz pro: programiz.pro
Website: www.programiz.com
Discord: discord.gg/programiz
Facebook: / programiz
Instagram: / _programiz
LinkedIn: / programiz
Website: www.programiz.com
Twitter: / programiz
#programiz #multidimensionalarrays #cprogramming #learnc #array #multidimensionalarrayinc #arrays #C
🔥Finding it Damn Hard to Understand C Programming?
Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT!
Try Programiz PRO for Free: bit.ly/master-c-programming
Well in the quiz,,, u cant create int arr[1][4]={{3,6,9,12}, {2,4,6,8}}; because in arr should be [2][4], so if it would be coded like this, and you will print out arr[1][4], it will choose the second row so {2,4,6,8} but it will print a random number :) @programizstudios
Random value is the answer coz there are only 4 elements in the second inner array , and indexes start from 0 , so 4th index number does not exist .
Gj
actually the answer is 0 and not random value...random value is generated when extra spaces are available and youre trying to print them....eg...youre given 5 index space to the array and only 2 are filled...then if u try to access the 4th index...u get random value...in this case it is different...
@@AnushasitCoderu get a random value, check the ans in their website
You are correct (answer: random).
The answer is 0, i did it for myself...
These videos have been the best if you want to understand C programming concepts quickly
Tq ...plz continue the videos we are waiting for more of c programming
most straightforward explanation .
This is helping me with collage. thank you a ton.
Love you mam. I started following your classes, but upload the next video as soon as possible.
You're just amazing mam
Nice teaching
Clean explanation as always! Thank you very much...
Thank you so much, Madam
Love you from Nepal. Full support for our best team in Nepal 🇳🇵 .
Her voice is really soothing.
I'm loving your voice. It's so calming 💯
good to watch and easy to learn tq
This is great tutorial it helps me alot
Your videos are super clear & helpful!! Thank you!!
Glad you like them!
awesome thankyou soo much ma'am
I love your videos. They're so easy to understand. Thank you so much
focus on what she is trying to teach.
@@prithviraj627 😅
Nice teacher for the Quiz, Random Value is printed. Thanks for sharing
thanks bro
amazing teacher😍
thanks
Please do about scope resolution operater
Hello programmiz I suggest you make a postgreSQL series
awesome!!
nice
Timestamps:
00:00 Start
00:20 C Multidimensional Arrays
00:39 Declaration multidimensional array
01:17 Initialization of multidimensional array
02:49 Access Array Elements
04:57 Change Array Indexes
06:56 Multidimensional Array and for loop
10:14 Quiz
please upload videos on pointers ASAP...
Random value will be printed as arr[1][4] doesn't exist..array index out of bounds
awesome, i have watched all videos prior to this one
option D .......as to have array with index 4 the declared array must be arr[1][5] but the declared array isnt
The correct answer is D.
The array was initialized as "arr[1][4]" which is incorrect, it should be "arr[2][4]". This causes only the first array to be recognized by the program, so when we try to print "arr[1][4]" (which should be "arr[2][4]" if the array was initialized properly) the value does not exist, therefore a random value will be printed.
Thank you!
Q. Which value will we get when we print arr[1][4] from the following array?
int arr[1][4] = { {3, 6, 9, 12}, {2, 4, 6, 8} };
A.12
B. 8
C. 0
D. Random Value
Random value
No Programming Task for this lecture.🙄🙄
C Because if you count 0, the 4th element does not exist.
D.Random value
Random value
Option D : Random Value
Vivid explanation. Love your teaching, the answer to the programiz quiz is D
option D) random value
Random value as only 1 array is declared so the 2nd array will hold 4 random number
Option D, But the truth is we don’t even get a random value as arr[1][4] does not exist
opt 4 , random value
please send me the link for the certificate program.
maam the answer will be zeero{0},as it can read upto [1][3],if i am wrong plz let me know.
Loving the videos
in the above array the size is exceeded because the actual size is arr[1][3] so the the above array pics the value zero because if the array[1][4] has no value to pick by default it will pick zero
D. Random Value
Random value
At first i thouhght the answer was B(8),
I then realised that int arr [1][4] is not present in the array elements we have been provided with. [1][4] in this case means that there's only one array with 4 elements in the array . However the numbers displayed {3, 6, 9, 12} , {2, 4, 6, 8} represents two arrays with each having 4 elements, hence the proper representations should be int arr[2][4] = {3, 6, 9, 12} , {2, 4, 6, 8} .
hence for the quiz provided you will get 0
example
#include
int main(){
int arr[2][4] = {{3, 6, 9, 12} , {2, 4, 6, 8}}; //two arrays with 4 elements in each array//
printf("%d ",arr[1][3]); // [0 1 - one is second i.e second array], [0 1 2 3 - 3 is fourth] hence the command asks us to print the fouth element of the second array//
return 0;
}
The output is 8
You're wrong
@@canhtranhLuat the answer is zero mate. Am sure you didn't read the whole comment..i said at first i thought the answer was 8, but after working it out..i.realized it's 0
@@collinshagembe7852 no, the correct ans is Random value
isn't the app available for systems?
Queeze answer is d - random value
Random value will be the ans for the last question
😲😲
D is right ans
it is error right? becuz it should be int arr[2],[4]????
make me so confused ,the answer is zero , random or error???
Do you have a personal Chanel please?
Option C is correct
💓💓💓
option.8
Please slove syntax program iam watch you video
12
Ramdom variable mam
maybe random value
I am started to follow this series but I don't know how will it benefit me in practical life
Answer is randome value
D is answer.
Answer is D)
Is D correct answer?
Quiz answer should be a random value
My Ans is B
beton yetmez beton
random value
The answer to the quiz is option 'D',Random value
Answer: D
This is because [4] is out of range for arr[1], so it will give a random number.
8
is answer
Quiz answer is Random Value
10:22 the answer is D, Right?
8
B.8
the answer of quiz is b,8
A. 12 is the answer,
cant imagine so many people in the comment going berserk over this simple question.
bro watch the video again
12 is [0], [3] btw
answer is D
A2
A is the correct answer because array starts from 0 and 1 2 3.
No, the answer is D, the array doesn't have a fourth index that's the issue. Of course, the array has 4 #'s held, but it does not have the specific 4th index it's asking for. This will ultimately result in a random number being printed since the fourth one doesn't exist.
Array starts from 0 when counting take note
Quiz: D
//Which value will we get when we print arr[1][4] from the following array? int arr[1][4] = { {3, 6, 9, 12}, {2, 4, 6, 8} }
#include
int main()
{
int arr[2][4] = {{3, 6, 9, 12}, {2, 4, 6, 8}};
for(int i=0; i
4. Ramdom Value
Quiz answer : b) 8
the Answer is C:=0
& it prints "CHEERIO" LMAOO 🤣🤣🤣🤣🤣
A
The answer of the quiz is 0;
C
random or zero
D
This quiz is wrong, it will give an error. Please respond if I am right.
djero
d
For the quiz, the answer would be C since in the declaration of the multidimensional array, you only put that you have 1 array instead of arr[2][4]. Therefore, the entire second array doesn’t exist, and would print out a 0.
C is wrong it is a random value.
This is because you only get zero when the index of an element was not given in an array that has the capacity of having that particular index.
@@kene583 I was going to say... Just because the other array doesn't exist doesn't mean anything, the fact is there is no 4 index in the first array and from the previous explanations any value that is accessed that doesn't exist in the array (the fourth index) prints out a random number.
Answer c)0
comment
12
is the correct answer
the answer is C. zero