Working with pointers
Vložit
- čas přidán 23. 07. 2024
- See complete series on pointers here • Pointers in C/C++
In this lesson, we will see some code snippets, and try to understand how to work with pointers in C or C++.
Watch the previous lesson "Introduction to pointers" for basics.
• Introduction to pointe...
For practice problems and more, visit: www.mycodeschool.com
Like us on Facebook: / mycodeschool
Follow us on twitter: / mycodeschool
These explanations are excellent, you're putting my professors to shame
Christian Abbott Thanks a lot :)
I learned more from his videos in one day than from 1 semester of college.
Exactly!
Mine too.
@@mycodeschool which compiler are you using?
You taught this concept better than how it was taught in Harvard's introduction to computer science class! thank you :)
cs50 girl :)
Are you Harvard girl? )
Olivia Townsend , Are you Harvard's student?
@@k.osiyuk lmao
Title are just titles. We are men of titles. We shouldn't be.
I know it sounded so philosophical!
This is not "Playing with Pointers" like you said, this is an excellent in depth explanation on C Pointers.
Thank you so much!
but he dead in car accident
Hey you are seriously gifted man... I honestly wish I was paying you my tuition and not my school. Like the other comment said you are putting my professors to shame. Keep what you are doing man... you are great at it.
Yeah ,You are right
Thank you so much! Being a non-computer science major, I've been studying programming myself and the concept of pointer has been one of the toughest to grasp. Now it makes more sense :)
There is no any other better explanations regarding pointers in youtube. Perfectly teaching with clear examples.
Your videos are SO much clearer than the explanations our professor gives. Thank you so much!
This vid saved me from failing C programming, you sir is amazing.
You explain 100x better than my professor. so thanks a lot!
These lectures are pure GOLD. Best lectures ever uploaded on CZcams. HatsOFF man........ :)
but he dead in car accident
@@shivamupadhyay3960 sadge
@@shivamverma9447 he was top coder in 2007 to 2014 in whole world
Short and concise, you my friend are legendary at teaching C.
Man, you're an amazing teacher. I was fed up at college when i wasn't able to understand anything about pointers and your videos helped me immensely to get those stuff. Keep up the good work man. Hats off to you!
hey Shreyansh, i just wanna what are you doing now... ( about your job.. )
Explained clearly and concisely. Brilliant work on the whole series.
Thank u for your simple english and great explaination!
The way you spent tym in making these videos as well as those captions(subtitles), is just great. Thank you so much for spending time and making our future bright.
You rocks mycodeschool. Its so fun and easy to do programming with your tutorials.
your legacy will always there ,miss u harsha sir
Oh My God! After watching this video my thought on pointers concept is totally changed as an easy concept. Perfect Explanation which I never heard before !!!!! :-) Thanks a lot
you sir deserve an award....thank you very much!
man you're very clear about the explanation which my prof couldn't do over the course of 2 classes. Thanks a bunch! Saved me from understanding the material.
Best pointer tutorials in CZcams, keep up the good work
You're a legend bro! I hated dealing with pointers before coming across your playlist, now they seem sensible. Thank you so much! You have brought me joy, and I look forward to making it to your data structures playlist. Best wishes, and I'm excited to see what comes next with this series on pointers.
some people said is dead, pray for him.
Perfect examples! I learned a lot. Thank you.
Thanks a lot. The lesson is so much detail and step-by-step. Great.
beautiful explanation , I was struggling to understand b4 watching Ur videos , u have made illustrated it in a very simple manner, tq .
Damn this is the greatest tutorial I have ever seen!!! Thank you.
thanks to your contribution to understanding basic logic in C programming. it is really easy to understand clearly.
Small add up to the course:
if you are trying to compile these codes from a linux terminal, you might get an error saying " expects argument type int ". its because ,when you try to get the memory address by printf, you cannot specify it as %d as its shown in the video.
instead of that try to put %p.
example:
printf("%d
", *p); // this might works fine since the out put is an integer as its expected.
but to get the address.
printf("%p
", p); //this works for the address
I can't believe I can spend so long confused by pointers and I come across these videos and it all clicks together. Thank you! (Also wonderful accent, it's like the diet version :))
It was very helpful and professionally ! Thanks for your efforts.
Thank you for all your hard work professor :)
Excellent Explaination , You cleared almost every doubt anyone can have with such ease , just Mind Blowing
Excellent work! Much appreciated.
Your explanations are very easy to understand. Thanks a bunch! I just subscribed!
Thank u sir u have made my concepts so clear may God bless ur soul...
Can't believe I actually understand this! Thanks
Excellent teacher. Your videos are pure gold. Thank you ...!
you´re honestly the best account, thank you so much!!!
Yaar this is THE SIMPLEST EXPLAINATION I have seen.Thank you sooo much dude!!
THNAK YOU SO MUCH FOR THESE VIDEOS...FAR BETTER THAN UTILISING MY PRESCRIBED TEXTBOOK. YOU REALLY DONT KNOW HOW MUCH IT IS APPRECIATED. THANK YOU
The best explanation I have ever ever seen all my life, thumbs up ~!
Thanks a lot for making all of these videos! You"re great explaner :)
these are really incridble videos.these videos are what i m seeking for..thanks for your work..these are helpful .
Thank you so much for these videos! They are really great :)
when you were explaining , you used a statement like "ADDRESS OF P".....But when we are using a pointer P, we are actually referring to the address of integer variable A rather than the address of integer to pointer P...To refer to the address of P we must use another pointer to integer (Cuz P is also a pointer of type integer or a pointer to integer) and we will store the address of pointer variable P in this variable..... :D By the way , your videos are really brilliant , the best i have seen so far ! Thanks :)
Sir really i thank you very much from the core of my heart. Please make more videos on other topics of programming .
Salam alykom
I find your lessons simple and clear
thank you
Im in my first semester of grad school and taking an intro to C programming class. The professor ruined this concept by not explaining it well and glossing over it. I’ve been struggling with these for 4 weeks and I’m so glad I found these explanations. Everything is coming together in my brain
Omg. That is so fascinating. I am enthralled by pointers now.
Thank you for all your hard work professor ,i think you are the next steve jobs....
Your videos are cool bro. Although from ten years ago but they can help me get more knowledge for programing
Fixed it.. Dude, u are awesome. Your videos help me to understand about pointers.
mano, ninguém supera a didática desse cara!!
You are an excellent teacher!
Dude, i love your videos and i want to tell u i hope u get the same help u r proving us in ur advanced career topics by other cool guys like yourself:))
Sir, first of all - hats off
You’re doing an amazing job. There is one correction however, sizeof is not a function, it’s an operator which is executed at compile time.
u r great.born to teach and learn new things. at 7:45 u cleared my confusion.
thanks a lot.
your teachings are directly attacking my mind;)Gr8 Work
i really appreciate you man ! excellent explanation !
You really made it so clear, thank you!
Thanks a lot ...
i learn so much from this video
Thank you for the videos. Your explanations make pointers much easier to understand. I have a question, though. Why use pointers to manipulate the int value. Wouldn't it be easier to just change the value directly. I guess I thought pointers were used to copy the integer value so it could be manipulated without changing the original variable value.
May God Bless your Soul RIP brother. You are missed a lot!!!
really?
Great video, man. Thank you!
You sir just made my day.
Thank you for your contribution. I hope I could repay you some day.
U can't he is dead.
You explain and teach well. Lucky I found this vid.
Next level explanation....Thanks very much...
You are the best!! ty!! from Argentina!
I have joined NIIT for c language but i couldn't get this level of explanation.
very gud explanation
Awesome work thanq :)
love this guys explanation
Nice to revisit these old videos
If he would have been alive the whole programming would have been a lot easy with these awesome explanations.
Thank you for your clear explanation.
Excellent Explanation , dear friend , Thank you very much for sharing ...
Thank you so much for the lesson !! Things are clear now ! :)
Good job bro....really helpfull.
very good series!
That's hell lot of a job brother, well done.
Thanks for your very helpful videos
Thank you so much, I was so confused you have solved my all doubts
excellent explanations!
bless your ultrawide videos
Wow. I did not know you can initialize the "*p" to the address. My book always did the long way. Now I understand how you can pass addresses through the parameter of other functions. Wow thank you for clearing that up. I was getting confused because I thought "*p" only contained a number at which "p" had the address of. But now I see that *p is to tell the c system the the variable p is a pointer!! And omg it makes so much sense
Correct me if I'm wrong!! Please I love to learn my own misconceptions
Thanks alot to mycodeschool
Thank you very much for the explanation!
Tip: sound level is very low.
Best explanation on youtube
Wow! Amazing class :)
what a explanations..excellent ..sir..
Great lessons!
*My takeaways:*
*& vs *:*
int a=10; \\ declare a variable
int *p; \\ create a pointer, and we have to initialise it otherwise we will have an error
p = &a; \\ initialise the pointer 'p' with the memory address of 'a' (i.e. &a)
int *p = &a; \\ we can also create a pointer and initialise it in one line of code
int* p = &a; \\ this does the same as the above code
*Be aware when we are not creating a pointer, 'p' is the pointer (i.e. the memory address) and '*p' is the value at the memory address pointed by 'p'.*
For example:
'*p' is the value at the memory address of 'a' (i.e. '&a')
=the value of 'a'
=10
*p = 12; \\ this is called dereferencing, we can change the value of 'a' to 12 using the pointer
*Index memory*
p is the memory address of 'a'
p+1 is the memory address of 'a' + the size of 'int' (i.e. 4 bytes), and if 'a' is in other data types, the size is different
Isn't *p = 12 called dereferencing? That is, changing the value at a position using pointers?
@@RM-lb7xw You are right, fixed.
i was struggling with this but i found your comment after figuring out by myself 🥲🥲
Great videos!
Really good video,thanks a lot!
Very very good teacher. Thanks
wow
you are an excellent teacher
Great work sir!
now i get it....u explained this soo well
great.....!! thank you so much for all the videos....can u plz upload the videos of java nd c++ too...
Bhai,you are awesome.Thanks a lot........
You sound like Dhoni... :D .. Good Explanations :)
tysm for di video bcoz of u I understand pointer perfectly
thanks :) it helps me to clear the concept :) :)