Pointers and multidimensional arrays

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ธ.ค. 2024

ความคิดเห็น • 146

  • @lemonyth
    @lemonyth 5 ปีที่แล้ว +98

    I know you'll never see this, but I just wanted to say that no amount of "thank you's" from me will ever be enough to convey the gratitude I have for your tutorials nor will they ever equal what you've done for us through your concise teaching.

    • @apoorvdixit2856
      @apoorvdixit2856 4 ปีที่แล้ว +1

      why *B do not give value but address. please help

    • @AdarshKumar-mf3ls
      @AdarshKumar-mf3ls 4 ปีที่แล้ว

      @@apoorvdixit2856 *B will return pointer to integer because it is multidimensional array. To get value you can again dereference it using **B.

    • @JJ-nv6nl
      @JJ-nv6nl 4 ปีที่แล้ว

      @@AdarshKumar-mf3ls but why don't we use & for that adress instead of *?

    • @AdarshKumar-mf3ls
      @AdarshKumar-mf3ls 4 ปีที่แล้ว

      @@JJ-nv6nl & gives the address of memory of the first element of array. But in array we can also get address of array by the array name .
      Pointer * is used to dereference (means to get data of array) .

    • @JJ-nv6nl
      @JJ-nv6nl 4 ปีที่แล้ว +1

      @@AdarshKumar-mf3ls thank you for answer, but what I don't understand is this: in 1-D array (let it name B) when we want adress of a first element we use &B and for value *B. But in 2-D array when we use *B we get adress of first element instead of value(like in 1-D array). Can you explain me why please?

  • @zmatt890
    @zmatt890 10 ปีที่แล้ว +39

    Your videos are very clear and informative, more-so than any other written article or video I've looked at regarding this subject specifically. Much appreciated !

  • @sagivalia5041
    @sagivalia5041 3 ปีที่แล้ว +4

    I was lucky enough to stumble in his videos through Free Code Camp.
    This guy is one of a kind, he manages to both explain a notoriously tricky subject in a simple way THAT is also understandable.
    I truly hope he is doing good in life, he deserves it.
    Regarding the passing of multi-dimensional arrays in functions, it seems abit hard-coded that you need to specify the dimensions of the array and can't do it truly flexible.

  • @anushkanayak3755
    @anushkanayak3755 7 ปีที่แล้ว +26

    Your voice is just awesome...and so is your way of explaining

  • @sushmitanigam4979
    @sushmitanigam4979 9 ปีที่แล้ว +8

    i dont have words to appreciate your lectures. I was so confused about the 2 dimensional array and pointer thing. I even read Dennis Ritchie book but all of them failed to clear my doubts when finally i saw ur videos and i got enlightened with such a tremendous knowledge.. Thanku sir..u r just awesome

  • @adityadonepudi885
    @adityadonepudi885 6 ปีที่แล้ว +2

    Sir, no one can explain pointers in a better way than you did. I literally pray you sir. Please please keep more videos on the basics of programming. How stuff works in memory etc etc. I think many would lack the same. But knowing it would definitely make one a rather more beautiful programmer

  • @TEXAS2459
    @TEXAS2459 9 ปีที่แล้ว +29

    well i cant believe that i have reached to this 11thh lesson of pointers by his book.......i hated pointers so much that it is unbelievable for me to even imagine digging deep in the concept....Thanks to mycodeschool his explain of things are awesome and simple.

    • @kurtne4892
      @kurtne4892 6 ปีที่แล้ว +2

      That topic is not that deep. Its just not obvious, in conclusion its really good to get an explanation

  • @ozzyfromspace
    @ozzyfromspace 5 ปีที่แล้ว +6

    For some reason this was kinda hard for me, but after watching this video (and the one before it) 7 billion times, I think I get it. Thank you!

  • @andrewchan8302
    @andrewchan8302 9 ปีที่แล้ว +5

    Truly amazing, I never used to get pointers, it has always baffled me. But now I have a good understanding of it. Thank you so much :D. Hopefully I can manipulate pointers better now.

  • @mohanaddarwish2307
    @mohanaddarwish2307 9 ปีที่แล้ว +10

    i am so happy :D
    "I am good working with multi-dimensional arrays using pointers"

  • @devendramishra4197
    @devendramishra4197 6 ปีที่แล้ว +1

    You are Awesome ..Electronics engineer ...like to understand the things deeply how it works ..You are the only i got on utube with such a nice explaination..thanx brother its really helpful..

  • @simranseetha6191
    @simranseetha6191 3 ปีที่แล้ว

    amazing , after my 4 years of engineering now i am getting this concept in just a 14 min video , thanks alot

  • @akshdeeprajawat9642
    @akshdeeprajawat9642 5 ปีที่แล้ว +4

    Ohh Balle Balle I understand Pointers now . So Happy !!!!!!!!!!!!! Thank you !!!!!!!!!!

  • @aswin2pranav
    @aswin2pranav 8 ปีที่แล้ว +1

    Beautiful.. simply cannot make it simpler or cleared... there is so much detail backed into these videos.

  • @sajithnandasena
    @sajithnandasena 4 ปีที่แล้ว

    Finally, I found who you are. Thanks for your great lectures.

  • @bigmak845
    @bigmak845 11 ปีที่แล้ว +1

    Very clear. You are an excellent teacher. Thanks!

  • @ahmed_raaphat
    @ahmed_raaphat ปีที่แล้ว

    This one is a bit mind-blowing. However, the explanation would have never been better than that. So clear and awesome!

  • @jenishkubavat7976
    @jenishkubavat7976 4 ปีที่แล้ว +2

    you make me fall in love with pointers

  • @VijayRaavi
    @VijayRaavi 5 ปีที่แล้ว +1

    This series is super clutch, thank you so much.

  • @sarmadkamran58
    @sarmadkamran58 2 ปีที่แล้ว

    The way you've represented this pointer Playlist, it's hard to believe this was uploaded 8 years ago.

  • @thekylesmithexperience
    @thekylesmithexperience ปีที่แล้ว

    This was helpful. Thank-you for creating this content on C++ pointers and 2D arrays!

  • @rahmatabadi3839
    @rahmatabadi3839 5 ปีที่แล้ว +3

    16:21 You are not 100% correct here. We can use void Func(int** A) for processing int B[2][3] but via auxiliary steps: int* p[] = {B[0],B[1]}; and int** pp =p;. So we pass Func(pp);

  • @ManishKumar-gb7yf
    @ManishKumar-gb7yf 5 ปีที่แล้ว +1

    Thanks for these awesome tutorials. Just one thing, I have tried assigning B directly to an integer pointer without using the parenthesis with the pointer variable and it works fine, it does not produce any compilation error.

  • @rittenbrake1613
    @rittenbrake1613 4 ปีที่แล้ว

    This is SUPER Clear !!!! Thousands Thanks !!!

  • @meghasyam427
    @meghasyam427 7 ปีที่แล้ว

    man you are the best.....i have been watchin this playlist from the beginning and it has just been awesome.... please upload beginner classes on python , javascript etc..

    • @nishanttiwari3015
      @nishanttiwari3015 6 ปีที่แล้ว

      He cannot. Go google about this guy. The loss has been tremendously ours. :(

    • @Anonymous-mz9un
      @Anonymous-mz9un 3 ปีที่แล้ว

      @@nishanttiwari3015 No. It is his friend. He now works in google.

  • @giocarro6935
    @giocarro6935 7 ปีที่แล้ว

    Simplemente lo ame!!! nunca había visto alguien que explicará tan bien los punteros!!! ¡Muchas Gracias! ¡Vi todos los videos! je, je

  • @HoldMyTeacup
    @HoldMyTeacup 4 ปีที่แล้ว +1

    00:28 I love your echo :)

  • @sushmitanigam4979
    @sushmitanigam4979 9 ปีที่แล้ว

    very valuable lesson for gate too..thanx sir..with ur help i am able to solve gate question of C

  • @Anonymous-mz9un
    @Anonymous-mz9un 3 ปีที่แล้ว +2

    Sad to hear your story sir. I know why you can't make videos any more. Still thanks for your existing videos. You guys were legendary to the whole programming community.

    • @ramzirich2585
      @ramzirich2585 3 ปีที่แล้ว +1

      why he stopped, hope nothing bad happened to him

    • @gigachadkartik
      @gigachadkartik 3 ปีที่แล้ว +1

      @@ramzirich2585 His friend(also partner in this channel) died in car accident.

  • @ShopperPlug
    @ShopperPlug 2 ปีที่แล้ว

    I can't believe c/c++ programming books does not show the multidimensional array used practically for function use, I never realized it could be so complex like this. Declaring multidimensional array is easy, making use out of them from functions is mind twisting.

  • @utcarshsrivastava6640
    @utcarshsrivastava6640 4 ปีที่แล้ว +1

    AT 13:01 , why does c& *c give same value. C is the pointer to the arrays, but *c is the pointer to the pointer to the arrays.

  • @Olavotemrazaodenovo
    @Olavotemrazaodenovo 4 ปีที่แล้ว

    Congratulations from Brazil.

  • @ottolin7142
    @ottolin7142 6 ปีที่แล้ว +3

    Can someone explain, why char** argv works?
    In the video it is said that int** A won't work. As far as I can say, the "3" in "A[ ][3]" is important to let the compiler know the size of the arrays. That way, pointer arithmetic will work.
    But how comes that "argv++" is a valid instruction (for example if you use getopt())?

  • @lasyagajavelli594
    @lasyagajavelli594 6 ปีที่แล้ว

    Do more videos like dis sir...u really solved my all probs ..thank you sir 🤗

  • @hemanthkumar3371
    @hemanthkumar3371 7 ปีที่แล้ว

    thank u very much sir. your teaching skill is very good and easy to understand.sorry sir I missed to put like in most of these videos

  • @JohnDoe-kj2cs
    @JohnDoe-kj2cs 3 ปีที่แล้ว

    Best explanation brotha !

  • @manishkumar-uv7rl
    @manishkumar-uv7rl 6 ปีที่แล้ว +3

    sir , at print statement we have to use pointer "p" instead of using multidimension array name(*c replace with *p) i think..?

  • @tejdeepreddy4307
    @tejdeepreddy4307 2 ปีที่แล้ว

    Good teaching sir....Thank you

  • @kautukraj
    @kautukraj 5 ปีที่แล้ว +1

    Very helpful.

  • @brunoferreiradasilva9358
    @brunoferreiradasilva9358 3 ปีที่แล้ว

    This is pure gold \o/

  • @chandrabhattasriram9475
    @chandrabhattasriram9475 7 ปีที่แล้ว

    Actually, if you think about it, a 2D array can be sent as a pointer to pointer in C/C++. If what you've said is true, then,
    "int main(int argc, char **argv)", would never work.
    Read this: stackoverflow.com/questions/8767166/passing-a-2d-array-to-a-c-function?noredirect=1&lq=1
    Apart from that, I think your video is really great to understand the concepts of multidimensional arrays :)

    • @musabr.5685
      @musabr.5685 6 ปีที่แล้ว

      only possible, when you have declared a pointer array. your argument related "int main(int argc, char **argv)" is totally wrong. or perhaps you can pass parameters it like (datatype * )arg .

  • @ash_engineering
    @ash_engineering 6 ปีที่แล้ว

    superb explanation, Thank you so much

  • @roshenw
    @roshenw 11 ปีที่แล้ว

    really good teaching.. Thank you !

  • @tazanoukevin7008
    @tazanoukevin7008 6 ปีที่แล้ว

    the expression *(*(b+i)+j) gives different byte values each time its being compiled, how to verify if its true? 6:44
    by the way , thanks for the videos,

  • @kiranbandagar2572
    @kiranbandagar2572 6 ปีที่แล้ว

    you are just awesome.....thanks a ton sir..

  • @gazeguilty6916
    @gazeguilty6916 6 ปีที่แล้ว

    really good explanation

  • @upmabaranwal5672
    @upmabaranwal5672 7 ปีที่แล้ว

    very clear xplanation sir

  • @225mrraj
    @225mrraj 11 ปีที่แล้ว

    awesome as always..

  • @oueslatinisrine8094
    @oueslatinisrine8094 2 ปีที่แล้ว

    Thank you 🙂💯

  • @indiann871
    @indiann871 ปีที่แล้ว

    Nice explanation

  • @Anoopegi
    @Anoopegi 9 ปีที่แล้ว +1

    very informative.
    i like your all videos.
    pls provide videos on oops in c++

  • @codingunconditionally
    @codingunconditionally 2 ปีที่แล้ว

    Amazing stuff, thank you so much! :)

  • @umairalvi7382
    @umairalvi7382 5 ปีที่แล้ว

    These are not just simple words that he is speaking they are diamonds.

  • @thakararkeval4759
    @thakararkeval4759 6 ปีที่แล้ว

    Sir which ide ya software are you using

  • @lifesmysteriesofficial
    @lifesmysteriesofficial 5 ปีที่แล้ว

    4:00

  • @karimshaikh3900
    @karimshaikh3900 3 ปีที่แล้ว

    Excellent!

  • @vitang007
    @vitang007 10 ปีที่แล้ว +16

    I want to know, why cant we use **p for a 2D array and ***p for a 3D array. I think it should work...can you please give the technicality associated with this.?

    • @GurpreetKakar4873
      @GurpreetKakar4873 7 ปีที่แล้ว

      ***p will work. It will print the B[0][0][0].

    • @chandrabhattasriram9475
      @chandrabhattasriram9475 7 ปีที่แล้ว +2

      Whatever you've pointed out is true and it does work.
      Read about it, in this link :-
      stackoverflow.com/questions/8767166/passing-a-2d-array-to-a-c-function?noredirect=1&lq=1

    • @418_akshitasharma3
      @418_akshitasharma3 3 ปีที่แล้ว

      **p is actually a pointer to pointer. What we need to pass is an array containing pointers.

  • @flying_Color
    @flying_Color 9 ปีที่แล้ว

    Thank you very much !

  • @amateurbeginner7538
    @amateurbeginner7538 7 ปีที่แล้ว

    please help :( why in 15:34 is false and in 15:48 is ok??

  • @yatinbahl6240
    @yatinbahl6240 3 ปีที่แล้ว

    9:50

  • @bineeshmathew6467
    @bineeshmathew6467 10 ปีที่แล้ว

    Sir your videos are very good. I have one doubt. I want to read a matrix from user and then pass it to a function. While writing code the dimension of that matrix will be unknown. Dimensions will be decided by the user. Let size is mXn. Can i use A[][n] to receive the matrix to the function.

    • @mycodeschool
      @mycodeschool  10 ปีที่แล้ว

      bineesh mathew Passing Multidimensional arrays as function argument in C/C++ is tricky. Watch these videos to understand this concept better. th-cam.com/video/sHcnvZA2u88h/w-d-xo.htmlttps://th-cam.com/video/_j5lhHWkbnQ/w-d-xo.html

    • @bineeshmathew6467
      @bineeshmathew6467 10 ปีที่แล้ว

      mycodeschool in the discussion not mentioning about 2D array that read from a user. in that case size of column and row will be unknown. in such case how we can pass it?

  • @ravi.k334
    @ravi.k334 9 ปีที่แล้ว

    it was very helpful for me

  • @SahilJSawant
    @SahilJSawant 6 ปีที่แล้ว

    in 1D array size had to passed separately. So for a 2D array do we need to pass the number of 1D arrays that are present in 2D array?

  • @ayushthakur733
    @ayushthakur733 3 ปีที่แล้ว

    what if we do not know the size of the 2-D array, what should we write in argument to pass it

  • @ravindersingh-cz9ir
    @ravindersingh-cz9ir 8 ปีที่แล้ว +4

    sir its not clear why *B returning 400 ?
    *B referencing to base address 400 so it should return 2
    pls clear my doubt??

    • @mitzucelrau
      @mitzucelrau 8 ปีที่แล้ว +9

      B - pointer to first in element inside B[n][m]
      *B - pointer to first element inside array B[0]
      If you want to get the value of element B[0][0], you should use *(*B)

    • @shadyahmed3830
      @shadyahmed3830 7 ปีที่แล้ว

      can you give me a simple example?

    • @patrasculucian2403
      @patrasculucian2403 6 ปีที่แล้ว +4

      Simple example:
      *B = 400
      B = 400
      *B + 1 = 404
      B + 1 = 412

  • @mohanaddarwish2307
    @mohanaddarwish2307 9 ปีที่แล้ว +1

    i admire ur work

  • @bhavikp43
    @bhavikp43 6 ปีที่แล้ว

    int a[5] = {2,4,5,8,1};
    int *p;
    p= a;
    print a; //200
    print *a; //2
    sir ne pehle wale video me bola ki pointer name ke aage * lagane se dereference hota h n value return karta h.
    but is wale video me 4:00 sir bol rhe h ki *baddress print karega matlab output 400 aayega .
    koi explanation de payega? @mycodeschool

    • @musabr.5685
      @musabr.5685 6 ปีที่แล้ว

      it is the 2-d array. so you need to add one more * to get the value. and it would be like **b which is equal to *b[0] or b[0][0] these are all same.
      *b = b[0] = &b[0][0] = b (period) will give you the same address

  • @sameerabegum6271
    @sameerabegum6271 8 ปีที่แล้ว

    sir..can u please show the logic needed for multiplication of matrices with n without functions plz

  • @md-ayaz
    @md-ayaz 8 ปีที่แล้ว +2

    Where can I find some practice questions on pointer arithmetic?

    • @emersonmicu1683
      @emersonmicu1683 8 ปีที่แล้ว +7

      +Mohmmad Ayaz Shaikh geeksquiz.com/c-language-2/pointers/

  • @kamalkannan5435
    @kamalkannan5435 7 ปีที่แล้ว

    Is it possible to represent the 3dimensional array in a picture, if possible help me guys with clear explanations and some real time examples as well.

  • @subdivisionalmass
    @subdivisionalmass 8 ปีที่แล้ว

    If you need a template, here is a nice one I created that can help you understand better hopefully.
    pastebin.com/A28MEwvk

  • @mrpossible5696
    @mrpossible5696 5 ปีที่แล้ว

    You are awesome

  • @tehseenakhtar7914
    @tehseenakhtar7914 4 ปีที่แล้ว

    very useful

  • @yogeshwarpatel7540
    @yogeshwarpatel7540 6 ปีที่แล้ว

    great explanation ever, thank you very much sir

  • @tomasz-rozanski
    @tomasz-rozanski 7 ปีที่แล้ว

    Looking at the picture it seems that there's three 4-element arrays. The 2-element arrays are not emphasised enough in my opinion. That's my only criticism; the rest is awesome as always.

  • @abdullaharean
    @abdullaharean 3 ปีที่แล้ว

    You are boss!

  • @joshsha6537
    @joshsha6537 11 ปีที่แล้ว +9

    My friend, you do have advance knowledge in C; but the way you are explaining in the video doesn't focus on a larger audience. Why don't you just simply use matrix memory address to explain multi-D arrays to make it easier rather than in a complex one block of memory location. Remember, not everyone has a degree in computer science while learning C in youtube. But I truly appreciate your videos.

    • @mycodeschool
      @mycodeschool  11 ปีที่แล้ว +33

      Hi Josh,
      We want to keep our videos as simple as possible. May be showing a 2-D memory block would have been better, but the idea here was to show how exactly 2-D arrays are stored in memory and interpreted during pointer manipulation. Memory should always be looked upon as a 1-D array of bytes. Anyway, i take your feedback. :)

    • @raziuddinmohd
      @raziuddinmohd 7 ปีที่แล้ว

      Sir, I salute your dedication to sharing the knowledge, I request you to do the same in the future.So that the student community can get helped with your knowledge.

    • @aarushiaiyyar
      @aarushiaiyyar 7 ปีที่แล้ว +1

      Sir, please don't change your style of teaching because an in depth knowledge of how pointers are stored in the memory is necessary! :)

  • @Olavotemrazaodenovo
    @Olavotemrazaodenovo 4 ปีที่แล้ว

    Excelente

  • @azizas9366
    @azizas9366 10 ปีที่แล้ว +1

    hello sir : i have one question ?
    is not c[1][0] = 7,9
    you wrote c[0][1] = 7,9
    i do not know why ?
    Thank you

    • @shahariaraitul3051
      @shahariaraitul3051 4 หลายเดือนก่อน

      can't believe I have the same question after 9 years! i was looking for the answer here but it seems I wouldn't

  • @maso553
    @maso553 ปีที่แล้ว

    if the **A just won't work, how does **argv work ?

  • @hemanthbs2649
    @hemanthbs2649 6 ปีที่แล้ว

    how to delete a particular data set from a 2D array??

  • @deepakarumugam5866
    @deepakarumugam5866 7 ปีที่แล้ว

    this statement int (*p)[3]=B didnot work well on my compiler is this statement int (*p)[3] like we are creating an array of pointers and so initialising an array this way didnot work or is this instruction int (*p)[3] compiler specific or is it neither way ...

    • @sahil1053
      @sahil1053 3 ปีที่แล้ว

      We can use void Func(int** A) for processing int B[2][3] but via auxiliary steps: int* p[] = {B[0],B[1]}; and int** pp =p;. So we pass Func(pp);

  • @fathimhiri5926
    @fathimhiri5926 4 ปีที่แล้ว

    god bless you inchallah

  • @ankitbhardwaj9566
    @ankitbhardwaj9566 6 ปีที่แล้ว

    Sorry I got my answer it was running in a code ,,,he has explained its answer as 800 earlier for our understanding

  • @pythonenthusiast9292
    @pythonenthusiast9292 4 ปีที่แล้ว

    but for address we use %u right?

  • @serhiy2020
    @serhiy2020 6 ปีที่แล้ว

    this reminds me of the movie Inception

  • @mithoonkumar9604
    @mithoonkumar9604 9 ปีที่แล้ว

    u r awesome :)

  • @gshreyaa
    @gshreyaa 4 ปีที่แล้ว

    in *(c[1]+1) isnt c[1] a 2d array thus c[1]+1 should be c[2] and the ans should be 832?

    • @Anonymous-mz9un
      @Anonymous-mz9un 3 ปีที่แล้ว

      Think of it as like this. for each * you are gonna replace a +
      so c[0][1][1] = *(c[0][1] + 1) = *(*(c[0]+1) + 1) = *(*(*(c+0)+1)+1). So if you wanna get value in a c[10][20][30] say you want c[9][15][23]
      you can do it like
      c[9][15][23] = *(c[9][15] + 23) = *(*(c[9]+15)+23) = *(*(*(c+9)+15)+23)
      and &c[9][15][23] = (*(*(c+9)+15) + 23) (without first *)

  • @lokeshk8187
    @lokeshk8187 9 ปีที่แล้ว

    can u please explain me once how *(c[0][0]+1)) will gives output as 5

    • @tigerrr6
      @tigerrr6 9 ปีที่แล้ว

      +Lokesh k hello, first of all, you need to understand that c[0] points to the first adress with the values (2,5)(7,9) witch both are arrays too, so if you look at c[0][0] you are getting a pointer to (2,5) the value 2 being on position 0 and the value 5 being on position 1, so when u have c[0][0][1] its pointing to the adress of 5, and because the expression is being dereferenced by the star, it returns the value contained on the c[0][0][1] adress .... hope it helped :)

    • @pns_news
      @pns_news 4 ปีที่แล้ว

      You can also write it as *(*(*(c+0) +0) +1) or c[0][0][1].

  • @ElAbdoullah
    @ElAbdoullah 5 ปีที่แล้ว

    Hi, just a question about the function taking a pointer to a 2D array as argument. You used A[ ][2] as parameter, butwhat if you don't know the size of that array ?

  • @qwe123727
    @qwe123727 8 ปีที่แล้ว +1

    You did not explain, why we cant say, `int b[2][3]; int *p = b;`, excluding the compiler warning

    • @maik5825
      @maik5825 4 ปีที่แล้ว

      He said that in a video before. p can not be an int-pointer. p has to be a pointer to an array. So we write `int (*p)[3] = b;` to say, that p is a pointer pointing on a int array with the length of 3.
      Edit: And now we can use this like `int x = p[0][1]` or `int y = *(*(p+0)+1)`.

  • @namhuynh6534
    @namhuynh6534 4 ปีที่แล้ว

    For A[3][2][2],
    print A + 1, it should be *A + 16 (size of array [2][2]) but I got + 10.
    For example, if *A = 500 -> A + 1 = 516 but I got 510.
    Does someone know about this?

    • @allHailKingJulien
      @allHailKingJulien 4 ปีที่แล้ว

      For the same input, I am getting it alright, 504 and 520. Have you checked the code again? Also, which compiler and language are you using?

    • @namhuynh6534
      @namhuynh6534 4 ปีที่แล้ว

      @@allHailKingJulien I run the code on VS Code with Code Runner extension and the language is C++

    • @allHailKingJulien
      @allHailKingJulien 4 ปีที่แล้ว

      @@namhuynh6534 I am running it on the same setup, I have no clue where it would have gone wrong

  • @ankitbhardwaj9566
    @ankitbhardwaj9566 6 ปีที่แล้ว

    Can anyone in this universe please explain me why the output at 12:53 is not showing 800 please.............reply...........soon.............

  • @tejashreeingale7095
    @tejashreeingale7095 4 ปีที่แล้ว

    I have doubt in *(C[0][1]+1) can be represented as &C[0][1][1]= 812 but you write 9, how?

    • @Anonymous-mz9un
      @Anonymous-mz9un 3 ปีที่แล้ว

      no *(c[0][1] + 1) = c[0][1][1] the value;

    • @Anonymous-mz9un
      @Anonymous-mz9un 3 ปีที่แล้ว

      Think of it as like this. for each * you are gonna replace a +
      so c[0][1][1] = *(c[0][1] + 1) = *(*(c[0]+1) + 1) = *(*(*(c+0)+1)+1). So if you wanna get value in a c[10][20][30] say you want c[9][15][23]
      you can do it like
      c[9][15][23] = *(c[9][15] + 23) = *(*(c[9]+15)+23) = *(*(*(c+9)+15)+23)
      and &c[9][15][23] = (*(*(c+9)+15) + 23) (without first *)

    • @Anonymous-mz9un
      @Anonymous-mz9un 3 ปีที่แล้ว

      So the ans to your question &c[0][1][1] == (*(*(c+0)+1)+1) without the covering *

  • @sahil1053
    @sahil1053 3 ปีที่แล้ว +1

    this seems simple ......... this is !!! but this is not !!!😒😒

  • @djamelbgd301
    @djamelbgd301 ปีที่แล้ว

    int mtx[2][2] = {0}
    int *(p)[2] = mtx;
    DOES NOT WORK , WHYYYYYYY??????????????

    • @Abc-me2cx
      @Abc-me2cx ปีที่แล้ว

      *should be inside like (*p)[2]. you can use chat gpt for this problems

  • @vijayendrasdm
    @vijayendrasdm 11 ปีที่แล้ว

    int (*p)[3] =B
    if I try to something like
    print (*p)[0] // 2
    print (*p)[1] // 3
    print (*p)[2] // 6
    Now
    print (*p)[3] should throw me error but this prints 4 why ?

  • @alieser7770
    @alieser7770 6 ปีที่แล้ว

    can I write c[0][5] instead of c[1][1]???

  • @souravsarkar488
    @souravsarkar488 5 ปีที่แล้ว

    Awesome explanation

  • @yatinbahl6240
    @yatinbahl6240 3 ปีที่แล้ว

    6:00