#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

КОМЕНТАРІ • 185

  • @programizstudios
    @programizstudios  2 роки тому +6

    🔥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

    • @cukcuk6489
      @cukcuk6489 3 місяці тому

      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

  • @ashutoshm.5920
    @ashutoshm.5920 2 роки тому +72

    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 Рік тому +1

      Gj

    • @AnushasitCoder
      @AnushasitCoder 5 місяців тому +2

      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 4 місяці тому +2

      @@AnushasitCoderu get a random value, check the ans in their website

    • @JoseCarv0
      @JoseCarv0 3 місяці тому

      You are correct (answer: random).

    • @bekmirzo9259
      @bekmirzo9259 2 місяці тому +1

      The answer is 0, i did it for myself...

  • @KELVINWAINAINA-hs7wq
    @KELVINWAINAINA-hs7wq 2 місяці тому +3

    These videos have been the best if you want to understand C programming concepts quickly

  • @nanimg3512
    @nanimg3512 2 роки тому +7

    Tq ...plz continue the videos we are waiting for more of c programming

  • @jip1521
    @jip1521 Рік тому +1

    most straightforward explanation .

  • @anthonyatienza3363
    @anthonyatienza3363 11 місяців тому +2

    This is helping me with collage. thank you a ton.

  • @gopalbathula1327
    @gopalbathula1327 2 роки тому +2

    Love you mam. I started following your classes, but upload the next video as soon as possible.

  • @akashmeesarapu6438
    @akashmeesarapu6438 Рік тому +2

    You're just amazing mam
    Nice teaching

  • @user-nt4nm4fb3u
    @user-nt4nm4fb3u 5 місяців тому +3

    Clean explanation as always! Thank you very much...

  • @nihatdonmzov4166
    @nihatdonmzov4166 Рік тому +2

    Thank you so much, Madam

  • @user-dk2dw8xu8h
    @user-dk2dw8xu8h 4 місяці тому +1

    Love you from Nepal. Full support for our best team in Nepal 🇳🇵 .

  • @tafsirnahian669
    @tafsirnahian669 Рік тому +2

    Her voice is really soothing.

  • @spinash7864
    @spinash7864 Рік тому

    I'm loving your voice. It's so calming 💯

  • @acemaster65
    @acemaster65 Рік тому +1

    good to watch and easy to learn tq

  • @yrroszage870
    @yrroszage870 2 роки тому

    This is great tutorial it helps me alot

  • @amayaamarasinghe5838
    @amayaamarasinghe5838 Рік тому +11

    Your videos are super clear & helpful!! Thank you!!

  • @idealworld142
    @idealworld142 2 роки тому

    awesome thankyou soo much ma'am

  • @mosopefoluwaadebawojo3543
    @mosopefoluwaadebawojo3543 2 роки тому +6

    I love your videos. They're so easy to understand. Thank you so much

  • @jeffersonmaingi
    @jeffersonmaingi Місяць тому

    Nice teacher for the Quiz, Random Value is printed. Thanks for sharing

  • @thesun___
    @thesun___ Рік тому +1

    thanks bro

  • @One_piece1089
    @One_piece1089 11 місяців тому

    amazing teacher😍

  • @user-iz2et4kj9y
    @user-iz2et4kj9y Рік тому

    thanks

  • @sltechgalaxy1677
    @sltechgalaxy1677 2 роки тому

    Please do about scope resolution operater

  • @buissondecsm7879
    @buissondecsm7879 2 роки тому

    Hello programmiz I suggest you make a postgreSQL series

  • @countrysideshowyaigrock4689

    awesome!!

  • @RATANAGARWALITINFORMER
    @RATANAGARWALITINFORMER 2 роки тому +1

    nice

  • @programizstudios
    @programizstudios  2 роки тому +14

    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

  • @manikumargannavarapu8123
    @manikumargannavarapu8123 2 роки тому

    please upload videos on pointers ASAP...

  • @siddharthabandyopadhyay5964
    @siddharthabandyopadhyay5964 2 роки тому +4

    Random value will be printed as arr[1][4] doesn't exist..array index out of bounds

  • @milanmisli5051
    @milanmisli5051 Рік тому

    awesome, i have watched all videos prior to this one

  • @vishakanr1478
    @vishakanr1478 2 роки тому +2

    option D .......as to have array with index 4 the declared array must be arr[1][5] but the declared array isnt

  • @gdkenzo
    @gdkenzo Рік тому +7

    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.

  • @programizstudios
    @programizstudios  2 роки тому +15

    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

  • @onic9623
    @onic9623 Рік тому +1

    Option D : Random Value

  • @albertamenyah3019
    @albertamenyah3019 11 місяців тому

    Vivid explanation. Love your teaching, the answer to the programiz quiz is D

  • @aminshaikh4592
    @aminshaikh4592 Рік тому

    option D) random value

  • @onihasan2576
    @onihasan2576 Рік тому

    Random value as only 1 array is declared so the 2nd array will hold 4 random number

  • @sibinp17
    @sibinp17 Рік тому +3

    Option D, But the truth is we don’t even get a random value as arr[1][4] does not exist

  • @yogithabale
    @yogithabale 6 днів тому

    opt 4 , random value

  • @emmanuels.k.dekpah
    @emmanuels.k.dekpah Рік тому

    please send me the link for the certificate program.

  • @Abhisheksingh-ep2gu
    @Abhisheksingh-ep2gu Рік тому

    maam the answer will be zeero{0},as it can read upto [1][3],if i am wrong plz let me know.

  • @aburayhansushmoy110
    @aburayhansushmoy110 Рік тому

    Loving the videos

  • @saisunkara1696
    @saisunkara1696 Рік тому +3

    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

  • @abbeyziraba2967
    @abbeyziraba2967 4 місяці тому

    D. Random Value

  • @avdeshsingh001
    @avdeshsingh001 Рік тому

    Random value

  • @collinshagembe7852
    @collinshagembe7852 Рік тому +1

    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

  • @crazy_me00
    @crazy_me00 16 днів тому

    isn't the app available for systems?

  • @umac287
    @umac287 7 місяців тому +4

    Queeze answer is d - random value

  • @suvrojit2004
    @suvrojit2004 7 місяців тому

    Random value will be the ans for the last question

  • @GATE318
    @GATE318 2 роки тому +2

    😲😲

  • @prajapatiajay
    @prajapatiajay Рік тому

    D is right ans

  • @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???

  • @yousifmerza5578
    @yousifmerza5578 Рік тому

    Do you have a personal Chanel please?

  • @duggisuguna4908
    @duggisuguna4908 2 роки тому

    Option C is correct

  • @priyeshkr18
    @priyeshkr18 2 місяці тому

    💓💓💓

  • @soumadeepdas7610
    @soumadeepdas7610 2 роки тому +1

    option.8

  • @shahmeerakbar2045
    @shahmeerakbar2045 2 роки тому

    Please slove syntax program iam watch you video

  • @IphOne-kb3bj
    @IphOne-kb3bj Рік тому +2

    12

  • @ghema9515
    @ghema9515 8 місяців тому

    Ramdom variable mam

  • @bibeklimbu-nt4ff
    @bibeklimbu-nt4ff 2 місяці тому

    maybe random value

  • @muznahhussain1321
    @muznahhussain1321 2 роки тому +1

    I am started to follow this series but I don't know how will it benefit me in practical life

  • @movietime7062
    @movietime7062 Рік тому

    Answer is randome value

  • @gazalaperween9602
    @gazalaperween9602 2 роки тому

    D is answer.

  • @balashebjadhav977
    @balashebjadhav977 10 місяців тому

    Answer is D)

  • @thecyber465
    @thecyber465 2 роки тому

    Is D correct answer?

  • @SavarahMarian
    @SavarahMarian 3 місяці тому

    Quiz answer should be a random value

  • @vinaykumarvinaykumar2006
    @vinaykumarvinaykumar2006 Рік тому

    My Ans is B

  • @yigitcamas229
    @yigitcamas229 Рік тому

    beton yetmez beton

  • @KpopRumbleAlliance
    @KpopRumbleAlliance 2 місяці тому

    random value

  • @teju_vasuchannel2080
    @teju_vasuchannel2080 8 місяців тому

    The answer to the quiz is option 'D',Random value

  • @has2236
    @has2236 Рік тому

    Answer: D
    This is because [4] is out of range for arr[1], so it will give a random number.

  • @DARKEMPIRE-1
    @DARKEMPIRE-1 2 роки тому

    8
    is answer

  • @adityad8929
    @adityad8929 Рік тому

    Quiz answer is Random Value

  • @AM-yd8en
    @AM-yd8en 8 місяців тому

    10:22 the answer is D, Right?

  • @fighterboy6577
    @fighterboy6577 2 роки тому +1

    8

  • @user-oi9kt9jo9n
    @user-oi9kt9jo9n 8 місяців тому

    B.8

  • @xxxegster6527
    @xxxegster6527 8 місяців тому

    the answer of quiz is b,8

  • @InsaneMedusa
    @InsaneMedusa Рік тому +1

    A. 12 is the answer,
    cant imagine so many people in the comment going berserk over this simple question.

  • @zuko8023
    @zuko8023 Місяць тому

    answer is D

  • @user-or7sl3jv8l
    @user-or7sl3jv8l 9 місяців тому

    A2

  • @safiullahmayar6153
    @safiullahmayar6153 2 роки тому +1

    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.

    • @LYIZA
      @LYIZA Рік тому +1

      Array starts from 0 when counting take note

  • @aboutouruniverse3834
    @aboutouruniverse3834 Рік тому

    Quiz: D

  • @thulasizwephetha8211
    @thulasizwephetha8211 2 роки тому +3

    //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

  • @mulareddy2624
    @mulareddy2624 Рік тому

    Quiz answer : b) 8

  • @bilecode8114
    @bilecode8114 2 роки тому +1

    the Answer is C:=0

  • @alanizaguirre4670
    @alanizaguirre4670 Рік тому +1

    & it prints "CHEERIO" LMAOO 🤣🤣🤣🤣🤣

  • @ladyadda
    @ladyadda Рік тому

    A

  • @nihatdonmzov4166
    @nihatdonmzov4166 Рік тому +1

    The answer of the quiz is 0;

  • @CyrusCyrus-ko9iy
    @CyrusCyrus-ko9iy Місяць тому

    C

  • @jackyjaii2154
    @jackyjaii2154 Рік тому

    random or zero

  • @Prince_Wlad
    @Prince_Wlad 11 місяців тому

    D

  • @pulkitgupta8344
    @pulkitgupta8344 Рік тому

    This quiz is wrong, it will give an error. Please respond if I am right.

  • @tasagrobar95
    @tasagrobar95 10 місяців тому

    djero

  • @shubhamsingh-bi7np
    @shubhamsingh-bi7np 2 роки тому

    d

  • @kaileebrennecke8515
    @kaileebrennecke8515 2 роки тому +5

    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 Рік тому +6

      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.

  • @joshuvamosay1427
    @joshuvamosay1427 Рік тому

    Answer c)0

  • @willemidaho
    @willemidaho Рік тому

    comment

  • @ivanurilski3157
    @ivanurilski3157 Рік тому

  • @gamerkim1912
    @gamerkim1912 2 роки тому +2

    12
    is the correct answer

  • @HythamFares
    @HythamFares 3 місяці тому

    the answer is C. zero