Pointers and arrays

  Рет қаралды 651,704

mycodeschool

mycodeschool

Күн бұрын

Пікірлер: 271
@mycodeschool
@mycodeschool 11 жыл бұрын
Thanks a lot :) this teaching model is already famous, if you have heard of Khan Academy.
@abhisheksingh-rd2ur
@abhisheksingh-rd2ur 8 жыл бұрын
There can't be a better teacher than you.......my concepts are so clear now.
@suneelabbigari
@suneelabbigari 7 жыл бұрын
what if i use int A[5] , in formal argumrnt ? is this same int* A[5] ? both are not same ? what would be the problem if i use ?
@venkateswarans1012
@venkateswarans1012 6 жыл бұрын
You won't get any compilation error, but its gonna be an undefined behaviour
@dharmang
@dharmang 5 жыл бұрын
hyperbole lmao xD
@FreeMayaTutorials
@FreeMayaTutorials 4 жыл бұрын
@@suneelabbigari You don't know what's located memory location 220 in this example. It'll compile but the output will be unknown.
@FreeMayaTutorials
@FreeMayaTutorials 4 жыл бұрын
This is a great tutorial, thanks!
@mycodeschool
@mycodeschool 11 жыл бұрын
Thanks a lot for the encouragement.
@leixun
@leixun 4 жыл бұрын
*My takeaways:* 1. Data in arrary are consecutive in memory 0:13 2. Assign an array to a pointer is equal to assign the memory address of the first value in the array to the pointer 4:20 3. How to get the memory address and value of an array element 5:03
@syedhamid01
@syedhamid01 2 жыл бұрын
Thnx
@Rahulsingh-theraha
@Rahulsingh-theraha 2 жыл бұрын
thank you for quick recapping
@ua2894
@ua2894 2 жыл бұрын
chinese guy learning from indian guy? how charmingly quaint!
@JulieTech
@JulieTech 8 ай бұрын
@@ua2894 Neighbors sharing together....Hahahaha..
@lindawisebear
@lindawisebear 8 жыл бұрын
This was beautifully explained; the best video I've seen on this topic! I like how you give plenty of examples and explain every single line of the examples you give clearly. Thanks from a c beginner!
@kiralosina8615
@kiralosina8615 3 жыл бұрын
*Only 18* 👇👇👇 667024.loveisreal.ru
@Kgotso_Koete
@Kgotso_Koete 8 жыл бұрын
The MyCodeSchool pointer series is the best/ most accessible explanations about pointers that I have seen in the galaxy!.
@bamster64
@bamster64 6 жыл бұрын
This series of tutorials are probably the best programming tutorials on KZbin, short but extremely well explained, how it should be.
@whatdphak
@whatdphak 4 жыл бұрын
One of the best teachers I've come accross so far in my life.
@kensei4237
@kensei4237 4 жыл бұрын
Agree.
@utkarshaggarwal1631
@utkarshaggarwal1631 4 жыл бұрын
The way you always link the concepts with the memory they use, makes it a whole lot clearer. that's where I always had doubts about its actual working. You are something else. Thank you!
@mdabusayeed2305
@mdabusayeed2305 7 жыл бұрын
I am ashamed of my Univ Teacher after watching these lectures. A long time nightmare is become a piece of cake.
@aadypillai5808
@aadypillai5808 4 жыл бұрын
im cryin i can literally feel my brain getting bigger
@torebektoregozhin4626
@torebektoregozhin4626 4 жыл бұрын
OMG I am falling off my chair AHAHHAHAh
@aadypillai5808
@aadypillai5808 3 жыл бұрын
damn thats crazy.. stfu
@khalidben9940
@khalidben9940 7 жыл бұрын
I watched this before and let me tell you that your explaining is really amazing.This is the best explaining so far
@shivamverma9447
@shivamverma9447 4 жыл бұрын
Thanks man for uploading these valuable lectures. These are pure GOLD..
@ammarm7
@ammarm7 10 жыл бұрын
Man your soo awesome, its finally clinking! Im gonna nail my exam tomorrow!!! Thank you.
@iTech1337
@iTech1337 7 жыл бұрын
did you nail it ?
@poljakov13
@poljakov13 7 жыл бұрын
he probably failed , why else hes afraid to confess us the result :D
@madjoemak
@madjoemak 7 жыл бұрын
Lol same. Mine is the day after tomorrow
@dhruvkaran9724
@dhruvkaran9724 4 жыл бұрын
@@poljakov13 madrasa education only fails u.
@peterpace3379
@peterpace3379 4 жыл бұрын
@@dhruvkaran9724 Being in VIT, I can confirm this is true.
@gerardo.arroyo.s
@gerardo.arroyo.s 5 ай бұрын
Thank u for explaining this! Wow, this was 11 years ago? 2013? Impressive
@somnathgarai
@somnathgarai 10 жыл бұрын
no one taught pointers and arrays concept like this... great learning experience and made the concept clear
@xz7525
@xz7525 4 жыл бұрын
Amazing explanations!! I hope these lectures continue to spread to many more people!
@SmartProgramming
@SmartProgramming 6 жыл бұрын
best tutorial for pointers and arrays, each and every concept is simply explained, keep it up sir 👍👍
@kevinl1080
@kevinl1080 2 жыл бұрын
This was great thanks! I am doing my first programming course in Computing Science and this video helps a lot
@Submersed24
@Submersed24 8 жыл бұрын
very good tutorial, thanks! feels so nice finally understanding this...
@vaishalijoshi7642
@vaishalijoshi7642 6 жыл бұрын
concepts and communication skill executing simultaneously....hatsoff
@palaksarawagi9290
@palaksarawagi9290 8 жыл бұрын
Thank You ! sir , concepts are getting clear now. Each and every tutorial of your is so clean and to the point.
@shalupathak6905
@shalupathak6905 5 жыл бұрын
You are osm..really... I was so much scared of doing programming.. But now I am doing good in it.. Thank you 😊 😊
@juannov7
@juannov7 2 жыл бұрын
Super clear and great examples, time to watch all your videos! THANK YOU!!
@sachinnihalani8150
@sachinnihalani8150 7 жыл бұрын
One cannot be more precise than u sir . Ty very much it helped me a lot
@shitalunde24
@shitalunde24 4 жыл бұрын
i had never understood this clearly ,but now my all doubts are cleared.thx for that .plz upload playlist on arrays , structure and union
@jumaelahmed9995
@jumaelahmed9995 3 жыл бұрын
May our creator bless you teacher!
@sajidmohammad5947
@sajidmohammad5947 3 жыл бұрын
*for anyone who needs an example for when array and pointers are used together, you can take a look at this. The question is "arrange array in ascending/ descending order using functions" #include void ascending(int *p); void descending(int *p); int main() { char seq; int a[10] = {10,2,4,6,8,1,3,5,7,9}; printf("Do you want ascending or descending sequence?(a/d)"); scanf("%c",&seq); if(seq == 'a') ascending(&a); if(seq== 'd') descending(&a); for(int i= 0; i
@justinli19901027
@justinli19901027 9 жыл бұрын
so well explained!! give a million thumbs up if I can!! Best tutorial channel on youtube!!
@deveshmeena5481
@deveshmeena5481 3 жыл бұрын
you just made it so much easier to undertsand. THANKS
@thiagaodavez5465
@thiagaodavez5465 Жыл бұрын
really good, i was very confused about the relationship between array and pointer, now its clearer
@OmarChida
@OmarChida 6 жыл бұрын
I LOVE YOU ! LEARNNING NEW THINGS HERE!
@rahulprajapati8743
@rahulprajapati8743 5 жыл бұрын
This Video lectures helped Me a lot. So thank you for that
@naboulsikhalid7763
@naboulsikhalid7763 5 ай бұрын
No doubt, best explanation of pointers and operations. thank you
@suigetsuhozuki1
@suigetsuhozuki1 4 жыл бұрын
Thank you very much for these lectures! Right now I'm watching these videos, typing your code alongside and taking notes; will go through this playlist one more time so the concepts sink in :)
@faithdame4823
@faithdame4823 7 жыл бұрын
Thank you so much for this. I been having difficulty trying to understand pointers. This was really helpful.
@TheThelifegame
@TheThelifegame 5 жыл бұрын
amazing , simple , clear , and straight forward
@SravanKumar-us5lw
@SravanKumar-us5lw 6 жыл бұрын
Your Lecture is Good !ThankGod Yu Saved me from Internals
@jeelkumarbaraiya5109
@jeelkumarbaraiya5109 6 жыл бұрын
Great sir!! You are providing best conceptual learning with smoothness and easiness.
@city5joy
@city5joy 5 жыл бұрын
basic concept but your lessons are very helpful!!! thank you!
@kaizhang9530
@kaizhang9530 6 жыл бұрын
The series too good that I always forget to give a like before move on to next video!!
@nivo6379
@nivo6379 5 жыл бұрын
Thank you for this course and the playlist.
@mycodeschool
@mycodeschool 11 жыл бұрын
A++ is saying "A = A+1", so we are trying to modify A here. When we use (A+1) in an expression, we never use it in a manner that A is modified. The whole concept is that if A is an array name, it works like pointer but it is not pointer. It is array. If you do something like "int *ptr = A", A returns a pointer that is collected in ptr and now you can do ptr++.
@MrRohit103
@MrRohit103 5 жыл бұрын
Array is a constant pointer because its job is to maintain the base address( You know, an array would be in a serious trouble if it loses its base address).
@ash_engineering
@ash_engineering 9 жыл бұрын
Thank you for such a wonderful video ..its really beneficial and informative ..thanks once again..
@suigetsuhozuki1
@suigetsuhozuki1 4 жыл бұрын
This is very important topic. "Equivalence" of pointers and arrays (though they are not really equivalent).
@AbhishekSingh-yr5uq
@AbhishekSingh-yr5uq 6 жыл бұрын
thanks it is very nice and simple ways of teaching the difference between them keep up the good work
@ryokajimosensei2780
@ryokajimosensei2780 3 жыл бұрын
Thank you indian tech support guy
@bencroacademy
@bencroacademy 6 жыл бұрын
Pointers are amazing man.. I love how that..just changes a variable in..void
@ShauryaChawlaprayforplagues
@ShauryaChawlaprayforplagues 8 жыл бұрын
Thanks for the video! *NOTE :- Printing the address of the first array element like printf("%d", A); doesn't work in case of linux users who use build-essential.
@thsdsyt
@thsdsyt 4 жыл бұрын
This was very clear, but It would be a good idea to make a video about the few differences between an array and a pointer. Thank you very much!
@tamilmaranc
@tamilmaranc 8 жыл бұрын
its very clear thank u so much....Just declaring two variable and storing in particulate address and printing the address and variable value which u could initialized
@XProgramerTV
@XProgramerTV 8 жыл бұрын
Thanks a lot! Damn I understood everything I need from this and ur character and array video. I was very confused from the "char *argv[]" thing.
@enkhnyambattulga9351
@enkhnyambattulga9351 4 жыл бұрын
how are you such a brilliant teacher omg
@junot9007
@junot9007 6 жыл бұрын
this was so clear and helpful; thank you!
@wcxjordan9859
@wcxjordan9859 8 жыл бұрын
So great!! Really good teaching!
@mounikadesai2513
@mounikadesai2513 10 жыл бұрын
thanks a lot for these tutorials understood d concept of pointers for d 1st tym :D
@rakeshreddy9417
@rakeshreddy9417 7 жыл бұрын
Awesome teachings ... and it is very very useful for beginners to understand the concepts easily.. Moreever the subtitles are some what not good because of the black background. We are unable to see the things behind that.. please ... make alternate..
@brettjay
@brettjay 9 жыл бұрын
Really like this one; crystal clear!
@CODINC
@CODINC 8 жыл бұрын
Thanks man, u r a great teacher. Im subscribing to u now!
@somentebruno
@somentebruno 8 жыл бұрын
thank you for the subtitles
@alialhilo5696
@alialhilo5696 4 жыл бұрын
what u did is really amazing bro !!
@likestomeasurestuff3554
@likestomeasurestuff3554 9 жыл бұрын
thank you very much for this video, it was very helpful :) - new subscriber
@tamilmaranc
@tamilmaranc 8 жыл бұрын
pointer variable generally mentioned in ptr instead of mentioning "p"
@thomash7247
@thomash7247 2 жыл бұрын
Thanks sir, your explanation is great
@medjefe2255
@medjefe2255 5 жыл бұрын
thank you so much finally pointers are clear for me .
@RokktimBiswas07
@RokktimBiswas07 8 жыл бұрын
Thank you animesh for the explanation. :)
@blandiblue
@blandiblue 4 жыл бұрын
Thank you very much my beloved friend.
@pinkipandey159
@pinkipandey159 6 жыл бұрын
Outstanding Sir... Truely thankfully
@sakibjobaid6667
@sakibjobaid6667 7 жыл бұрын
this is a tremendous good video i have ever seen !!!!
@himanshipatil911
@himanshipatil911 6 жыл бұрын
really excellent explanation
@tamilmaranc
@tamilmaranc 8 жыл бұрын
good explanation more over when you store the arrays values the address should serial based i mean to say like 200,201,202,203 like that ...since arrays gives sequetial based address storage but you had mentioned like 200 204 2014 like that ...
@shrinathdakare3725
@shrinathdakare3725 8 жыл бұрын
You are too good.Thank you very much.
@melancholiethelab9478
@melancholiethelab9478 6 жыл бұрын
Thank you for making this tutorial.
@sharonslibrary
@sharonslibrary 7 жыл бұрын
First of all i appreciate what you are doing sir, its Great. I wrote the same codes and instructions as in the video but i didn´t get the same results though, instead of the adress allocation and values of each Array , i´m gettin the sum of the numbers and their position the code; #include #include int main() { int A[ ] = { 2, 4, 5, 8, 1 }; int i ; for (i = 0; i < 5; i++); { printf("adress = %d ", A + i); printf("value = %d ", *(A + i)); } system("PAUSE"); return 0; }
@Shiva-zy7jq
@Shiva-zy7jq 6 жыл бұрын
Thank you so much sir. Video was really helpful
@rvlabaji
@rvlabaji 8 жыл бұрын
#Awesome tutorial sir😃😃😃😃😃😃 Thank you
@mustang...
@mustang... 6 жыл бұрын
What is the difference between A and &A[0]? I saw some answers on stackoverflow that they have different types( like sizeof gives different results), but it's still unclear how exactly it works if they point to the same address.
@rakshitks7850
@rakshitks7850 5 жыл бұрын
Awesome as usual....very informative
@07bhas
@07bhas 11 жыл бұрын
Hi! Thanks for the lectures. In the ed, you mentioned that you cannot directly increment the base address of an array (say for example 'A') as A++. But isn't it similar to doing A+1? And the operation A+1 works! could you explain this?
@sdani9160
@sdani9160 5 жыл бұрын
4:51 but A is not a pointer variable so how can you dereference it..and get the value 2
@keshavkudale7258
@keshavkudale7258 5 жыл бұрын
Its print p, he did a mistake
@bhzo2010
@bhzo2010 11 жыл бұрын
Thanks a lot.. -- you are doing excellent work..
@dineshgarg9567
@dineshgarg9567 7 жыл бұрын
Multiple declaration of i at 8:00
@abinash138
@abinash138 7 жыл бұрын
is that supposed to be an error? reply plz
@dineshgarg9567
@dineshgarg9567 7 жыл бұрын
My compiler thinks so..
@sayanmajumder5843
@sayanmajumder5843 7 жыл бұрын
sir @4:48 why not p=&A??
@thinkandroid1248
@thinkandroid1248 7 жыл бұрын
Array A is having 5 different addresses if you are writing int *p=&A it wont able to point which address to point.Try to write int *p=&A[0] this will print address of 1st element. And if you directly write int *p=A. This will point to base address that is 1st element address
@sayanmajumder1795
@sayanmajumder1795 7 жыл бұрын
rajnish suryavanshi but we use & sign to store the address of any variable then how can *p=A point to the base address
@Rohitchakra1
@Rohitchakra1 7 жыл бұрын
A stores the base address of the starting of the array. and A is equal to &A[0].
@aspireshekar
@aspireshekar 8 жыл бұрын
nice one abhishek keep extending...
@liyangyu1031
@liyangyu1031 9 жыл бұрын
where is int a[65536] store? stack or heap? the stack is 1M size max?
@markusiak1
@markusiak1 7 жыл бұрын
Inside function: stack. Outside : global variable. On heap, only with dynamic memory allocators, like malloc, or new in c++ :D
@linf31337
@linf31337 8 жыл бұрын
Thank you for your video :) i have a question, what are the differences between this code to view an element in an array, why would you use one over the other printf("%d",a[3]); printf("%d",*(p+3));
@seemapradhan837
@seemapradhan837 8 жыл бұрын
so u mean in a modern compiler, int is of 4 bytes? isnt it 2 bytes?
@DanceWithAbby
@DanceWithAbby 8 жыл бұрын
its 4 bytes
@seemapradhan837
@seemapradhan837 8 жыл бұрын
It depends on the compiler.
@elvinjafarli6257
@elvinjafarli6257 7 жыл бұрын
Depends on Operating System, if it is 32 system, then int is 2 bytes, if 64 , then 4 byte
@shimmylikejimmy7023
@shimmylikejimmy7023 7 жыл бұрын
As others have mentioned, it depends on your setup. Use the sizeof keyword to check how many bytes your system dedicates to a particular data type.
@taymurahmed7119
@taymurahmed7119 9 жыл бұрын
Sir, you are just awesome...
@masbro1901
@masbro1901 8 жыл бұрын
4:37 so, if we declare P=A , and print A = it will give us the first element of arrays ? whuah, i didn't know that, if so, then we don't have to declare P=&[A0] anymore , hmm
@crapola71
@crapola71 8 жыл бұрын
+mas bro It's because any array variable, pointer or not, is a pointer to the array's 1st element. Nice to have it explained so clear and carefully though, I'm enjoying these videos
@andyandrw
@andyandrw 7 жыл бұрын
Very good video, I only have one question. Why you can use *myArray to point to the 1st value, but you can't *(myArray[3])? I know that for this you would use myArray[i], but wondered why is the reason behind this =)
@anujkhare3815
@anujkhare3815 4 жыл бұрын
shouldn't he be using %p in printf formatting for pointers? I mean visual studio code might allow it but I think he should use %p because it is the standard way of doing so.
@kartikpanicker9275
@kartikpanicker9275 8 жыл бұрын
God bless you master......
@khalil-wc4bs
@khalil-wc4bs 6 жыл бұрын
These indians are the kings of youtube
@masterchef8671
@masterchef8671 8 жыл бұрын
U saved my life !
@tanisha6948
@tanisha6948 7 жыл бұрын
Sir,can u please explain why we did p++; and not a++; they both store the address of variables as a also refers to the address of the first element of the array.
@cesaresquivel9692
@cesaresquivel9692 5 жыл бұрын
best teacher ever🔥👌🙏
@devikasathyan1333
@devikasathyan1333 4 жыл бұрын
sir, can the variable name start with uppercase letter??? excellent video sir
@chiragnandaniya3133
@chiragnandaniya3133 6 жыл бұрын
Thanks sir it helped a lot!!
@hemvjay
@hemvjay 8 жыл бұрын
What value here A refers when we do the operation (A+i ),*(A+i)
@praxisdev1884
@praxisdev1884 7 жыл бұрын
You're my hero.
Arrays as function arguments
12:54
mycodeschool
Рет қаралды 379 М.
Pointers and 2-D arrays
12:19
mycodeschool
Рет қаралды 487 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 22 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 21 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 29 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 30 МЛН
1.4 Pointers and Arrays | Data structure Tutorials
25:05
Jenny's Lectures CS IT
Рет қаралды 634 М.
Character arrays and pointers - part 1
14:41
mycodeschool
Рет қаралды 551 М.
Pointers and dynamic memory - stack vs heap
17:26
mycodeschool
Рет қаралды 1,5 МЛН
array vs &array Pointers Difference Explained | C Programming Tutorial
17:38
2 Years of C++ Programming
8:20
Zyger
Рет қаралды 125 М.
you will never ask about pointers again after watching this video
8:03
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 301 М.
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 4,2 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 22 МЛН