#20 C Multidimensional Arrays | C Programming For Beginners

  Рет қаралды 128,789

Programiz

Programiz

Күн бұрын

Пікірлер: 213
@programizstudios
@programizstudios 2 жыл бұрын
🚀 Loved the tutorial? Take it further with Programiz PRO! Refine your skills, conquer coding fears, and build confidence with interactive lessons, quizzes, and challenges. Strengthen your programming foundation and master C today! 👉Start Here: bit.ly/c-master
@programizstudios
@programizstudios 2 жыл бұрын
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
@ashutoshm.5920
@ashutoshm.5920 2 жыл бұрын
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 .
@ethanflorko496
@ethanflorko496 Жыл бұрын
Gj
@AnushasitCoder
@AnushasitCoder 10 ай бұрын
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...
@juliotitosagastegui9453
@juliotitosagastegui9453 10 ай бұрын
@@AnushasitCoderu get a random value, check the ans in their website
@JoseCarv0
@JoseCarv0 9 ай бұрын
You are correct (answer: random).
@bekmirzo_berdimurodov
@bekmirzo_berdimurodov 8 ай бұрын
The answer is 0, i did it for myself...
@KamalPoudel-h1f
@KamalPoudel-h1f 9 ай бұрын
Love you from Nepal. Full support for our best team in Nepal 🇳🇵 .
@KELVINWAINAINA-hs7wq
@KELVINWAINAINA-hs7wq 8 ай бұрын
These videos have been the best if you want to understand C programming concepts quickly
@nanimg3512
@nanimg3512 2 жыл бұрын
Tq ...plz continue the videos we are waiting for more of c programming
@user-nt4nm4fb3u
@user-nt4nm4fb3u 11 ай бұрын
Clean explanation as always! Thank you very much...
@denkyitehillah7449
@denkyitehillah7449 5 ай бұрын
The code #include int main() { int marks[5]; int sum=0; int average; printf("Enter the 5 marks: "); for (int i=0; i
@ManjulaManjula-g2v
@ManjulaManjula-g2v 16 күн бұрын
🎉🎉🎉
@anthonyatienza3363
@anthonyatienza3363 Жыл бұрын
This is helping me with collage. thank you a ton.
@tafsirnahian669
@tafsirnahian669 2 жыл бұрын
Her voice is really soothing.
@dcpowered
@dcpowered 3 ай бұрын
Big like from me! I discovered your website looking for code snippets. Your channel is fantastic for a C beginner!
@gopalbathula1327
@gopalbathula1327 2 жыл бұрын
Love you mam. I started following your classes, but upload the next video as soon as possible.
@jip1521
@jip1521 Жыл бұрын
most straightforward explanation .
@programizstudios
@programizstudios 2 жыл бұрын
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
@thisistusharmahajan
@thisistusharmahajan 2 жыл бұрын
Random value
@thisistusharmahajan
@thisistusharmahajan 2 жыл бұрын
No Programming Task for this lecture.🙄🙄
@haidang4love
@haidang4love 2 жыл бұрын
C Because if you count 0, the 4th element does not exist.
@renuga.k7473
@renuga.k7473 2 жыл бұрын
D.Random value
@jayminpanchal6442
@jayminpanchal6442 2 жыл бұрын
Random value
@amayaamarasinghe5838
@amayaamarasinghe5838 2 жыл бұрын
Your videos are super clear & helpful!! Thank you!!
@programizstudios
@programizstudios 2 жыл бұрын
Glad you like them!
@mosopefoluwaadebawojo3543
@mosopefoluwaadebawojo3543 2 жыл бұрын
I love your videos. They're so easy to understand. Thank you so much
@prithviraj627
@prithviraj627 2 жыл бұрын
focus on what she is trying to teach.
@AaravMakan
@AaravMakan 2 жыл бұрын
@@prithviraj627 😅
@acemaster65
@acemaster65 Жыл бұрын
good to watch and easy to learn tq
@nihatdonmzov4166
@nihatdonmzov4166 2 жыл бұрын
Thank you so much, Madam
@jeffersonmaingi
@jeffersonmaingi 6 ай бұрын
Nice teacher for the Quiz, Random Value is printed. Thanks for sharing
@siddharthabandyopadhyay5964
@siddharthabandyopadhyay5964 2 жыл бұрын
Random value will be printed as arr[1][4] doesn't exist..array index out of bounds
@red1iteee
@red1iteee Жыл бұрын
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.
@MG-dj7kf
@MG-dj7kf Жыл бұрын
Thank you!
@akashmeesarapu6438
@akashmeesarapu6438 2 жыл бұрын
You're just amazing mam Nice teaching
@spinash7864
@spinash7864 Жыл бұрын
I'm loving your voice. It's so calming 💯
@thesun___
@thesun___ Жыл бұрын
thanks bro
@onic9623
@onic9623 Жыл бұрын
Option D : Random Value
@sebiddeusama9113
@sebiddeusama9113 2 ай бұрын
thanks have benefited alot
@vishakanr1478
@vishakanr1478 2 жыл бұрын
option D .......as to have array with index 4 the declared array must be arr[1][5] but the declared array isnt
@albertamenyah3019
@albertamenyah3019 Жыл бұрын
Vivid explanation. Love your teaching, the answer to the programiz quiz is D
@b7sh_b7sh
@b7sh_b7sh Жыл бұрын
amazing teacher😍
@sibinp17
@sibinp17 Жыл бұрын
Option D, But the truth is we don’t even get a random value as arr[1][4] does not exist
@saisunkara1696
@saisunkara1696 Жыл бұрын
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
@milanmisli5051
@milanmisli5051 2 жыл бұрын
awesome, i have watched all videos prior to this one
@mrawesome7739
@mrawesome7739 8 күн бұрын
Please make video with multidimensional malloc
@jackyjaii2154
@jackyjaii2154 Жыл бұрын
it is error right? becuz it should be int arr[2],[4]???? make me so confused ,the answer is zero , random or error???
@idealworld142
@idealworld142 2 жыл бұрын
awesome thankyou soo much ma'am
@Abhisheksingh-ep2gu
@Abhisheksingh-ep2gu 2 жыл бұрын
maam the answer will be zeero{0},as it can read upto [1][3],if i am wrong plz let me know.
@collinshagembe7852
@collinshagembe7852 Жыл бұрын
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
@canhtranhLuat
@canhtranhLuat Жыл бұрын
You're wrong
@collinshagembe7852
@collinshagembe7852 Жыл бұрын
@@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
@canhtranhLuat
@canhtranhLuat Жыл бұрын
@@collinshagembe7852 no, the correct ans is Random value
@TemesgenAlemu-b7w
@TemesgenAlemu-b7w 5 ай бұрын
@@canhtranhLuat I think, the answer is 0. She was explaining this issue while she was teaching about arrays. Go and check my friend.
@umac287
@umac287 Жыл бұрын
Queeze answer is d - random value
@countrysideshowyaigrock4689
@countrysideshowyaigrock4689 Жыл бұрын
awesome!!
@yrroszage870
@yrroszage870 2 жыл бұрын
This is great tutorial it helps me alot
@buissondecsm7879
@buissondecsm7879 2 жыл бұрын
Hello programmiz I suggest you make a postgreSQL series
@RATANAGARWALITINFORMER
@RATANAGARWALITINFORMER 2 жыл бұрын
nice
@aburayhansushmoy110
@aburayhansushmoy110 2 жыл бұрын
Loving the videos
@ΚωνσταντίνοςΛαζαρίδης-ξ9ι
@ΚωνσταντίνοςΛαζαρίδης-ξ9ι Жыл бұрын
thanks
@thulasizwephetha8211
@thulasizwephetha8211 2 жыл бұрын
//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
@harshadatapre2133
@harshadatapre2133 2 жыл бұрын
4. Ramdom Value
@crazy_me00
@crazy_me00 6 ай бұрын
isn't the app available for systems?
@harshchauhan4945
@harshchauhan4945 2 ай бұрын
option D. Random value
@TemesgenAlemu-b7w
@TemesgenAlemu-b7w 5 ай бұрын
The correct answer is C since int the second array, we don't have fourth element which in this case it is assumed to be 0.
@InsaneMedusa
@InsaneMedusa 2 жыл бұрын
A. 12 is the answer, cant imagine so many people in the comment going berserk over this simple question.
@jackyjaii2154
@jackyjaii2154 Жыл бұрын
bro watch the video again
@jackyjaii2154
@jackyjaii2154 Жыл бұрын
12 is [0], [3] btw
@manikumargannavarapu8123
@manikumargannavarapu8123 2 жыл бұрын
please upload videos on pointers ASAP...
@aminshaikh4592
@aminshaikh4592 2 жыл бұрын
option D) random value
@AM-yd8en
@AM-yd8en Жыл бұрын
10:22 the answer is D, Right?
@kaileebrennecke8515
@kaileebrennecke8515 2 жыл бұрын
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.
@kene583
@kene583 2 жыл бұрын
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.
@ethanflorko496
@ethanflorko496 Жыл бұрын
@@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.
@muznahhussain1321
@muznahhussain1321 2 жыл бұрын
I am started to follow this series but I don't know how will it benefit me in practical life
@has2236
@has2236 Жыл бұрын
Answer: D This is because [4] is out of range for arr[1], so it will give a random number.
@sltechgalaxy1677
@sltechgalaxy1677 2 жыл бұрын
Please do about scope resolution operater
@internethippo-p3q
@internethippo-p3q 5 ай бұрын
Random value the matrix is of order 2*4 that doesn't appear in the array
@judithneumbe-z9r
@judithneumbe-z9r 2 ай бұрын
Why are we using the increment
@suvrojit2004
@suvrojit2004 Жыл бұрын
Random value will be the ans for the last question
@GATE318
@GATE318 2 жыл бұрын
😲😲
@onihasan2576
@onihasan2576 Жыл бұрын
Random value as only 1 array is declared so the 2nd array will hold 4 random number
@yogithabale
@yogithabale 5 ай бұрын
opt 4 , random value
@fredambrose
@fredambrose 3 ай бұрын
Can you teach me to program the Chicken Marsalla?
@emmanuels.k.dekpah
@emmanuels.k.dekpah 2 жыл бұрын
please send me the link for the certificate program.
@yousifmerza5578
@yousifmerza5578 2 жыл бұрын
Do you have a personal Chanel please?
@prajapatiajay
@prajapatiajay 2 жыл бұрын
D is right ans
@yigitcamas229
@yigitcamas229 Жыл бұрын
beton yetmez beton
@barkhadibraahim1023
@barkhadibraahim1023 2 жыл бұрын
#include int main() { // Write C code here int arr[1][4] = { {3, 6, 9, 12}, {2, 4, 6, 8} }; printf("%d", arr [1] [4]); return 0; } answer is = 0
@kareemtawfik2886
@kareemtawfik2886 Жыл бұрын
D. Random Value
@priyeshkr18
@priyeshkr18 7 ай бұрын
💓💓💓
@proxycomandos
@proxycomandos 3 ай бұрын
i just compile this program and it waas eror for too many initializers
@teju_vasuchannel2080
@teju_vasuchannel2080 Жыл бұрын
The answer to the quiz is option 'D',Random value
@soumadeepdas7610
@soumadeepdas7610 2 жыл бұрын
option.8
@duggisuguna4908
@duggisuguna4908 2 жыл бұрын
Option C is correct
@SavarahMarian
@SavarahMarian 8 ай бұрын
Quiz answer should be a random value
@ivanurilski3157
@ivanurilski3157 Жыл бұрын
@gazalaperween9602
@gazalaperween9602 2 жыл бұрын
D is answer.
@alanizaguirre4670
@alanizaguirre4670 2 жыл бұрын
& it prints "CHEERIO" LMAOO 🤣🤣🤣🤣🤣
@safiullahmayar6153
@safiullahmayar6153 2 жыл бұрын
A is the correct answer because array starts from 0 and 1 2 3.
@ethanflorko496
@ethanflorko496 Жыл бұрын
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.
@LizaOG
@LizaOG Жыл бұрын
Array starts from 0 when counting take note
@thecyber465
@thecyber465 2 жыл бұрын
Is D correct answer?
@balashebjadhav977
@balashebjadhav977 Жыл бұрын
Answer is D)
@adityad8929
@adityad8929 Жыл бұрын
Quiz answer is Random Value
@ghema9515
@ghema9515 Жыл бұрын
Ramdom variable mam
@bullshit485
@bullshit485 Ай бұрын
The Answer is D, Random Number.
@bilecode8114
@bilecode8114 2 жыл бұрын
the Answer is C:=0
@IphOne-kb3bj
@IphOne-kb3bj 2 жыл бұрын
12
@vinaykumarvinaykumar2006
@vinaykumarvinaykumar2006 2 жыл бұрын
My Ans is B
@zuko8023
@zuko8023 7 ай бұрын
answer is D
@bibeklimbu-nt4ff
@bibeklimbu-nt4ff 8 ай бұрын
maybe random value
@movietime7062
@movietime7062 2 жыл бұрын
Answer is randome value
@shahmeerakbar2045
@shahmeerakbar2045 2 жыл бұрын
Please slove syntax program iam watch you video
@xxxegster6527
@xxxegster6527 Жыл бұрын
the answer of quiz is b,8
@mulareddy2624
@mulareddy2624 2 жыл бұрын
Quiz answer : b) 8
@nihatdonmzov4166
@nihatdonmzov4166 2 жыл бұрын
The answer of the quiz is 0;
@aboutouruniverse3834
@aboutouruniverse3834 Жыл бұрын
Quiz: D
@DARKEMPIRE-1
@DARKEMPIRE-1 2 жыл бұрын
8 is answer
@Bestinfo3690
@Bestinfo3690 4 ай бұрын
Opt B
@gamerkim1912
@gamerkim1912 2 жыл бұрын
12 is the correct answer
@JOSEPHMUKAMA-v3b
@JOSEPHMUKAMA-v3b Жыл бұрын
B.8
@pulkitgupta8344
@pulkitgupta8344 2 жыл бұрын
This quiz is wrong, it will give an error. Please respond if I am right.
#21 C Strings | C Programming For Beginners
10:13
Programiz
Рет қаралды 156 М.
#15  C Functions | C Programming for Beginners
16:57
Programiz
Рет қаралды 243 М.
UFC 287 : Перейра VS Адесанья 2
6:02
Setanta Sports UFC
Рет қаралды 486 М.
C++ multidimensional arrays explained ⬜
7:41
Bro Code
Рет қаралды 16 М.
you will never ask about pointers again after watching this video
8:03
#19 C Arrays | C Programming For Beginners
13:04
Programiz
Рет қаралды 297 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 1 МЛН
C Programming Tutorial 84 - Multidimensional Arrays
5:10
Caleb Curry
Рет қаралды 48 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 843 М.
#23 C Pointers | C Programming For Beginners
11:01
Programiz
Рет қаралды 156 М.
2D Array Basics | C Programming Tutorial
14:10
Portfolio Courses
Рет қаралды 29 М.
Naming Things in Code
7:25
CodeAesthetic
Рет қаралды 2,3 МЛН