Function Pointers in C / C++

  Рет қаралды 435,504

mycodeschool

mycodeschool

Күн бұрын

See complete series on pointers here:
• Pointers in C/C++
In this lesson, we have explained the concept of function pointers and shown how you can create and use function pointers in C or C++.
Feel free to drop your comments, feedback and suggestions.
For practice problems and more, visit: www.mycodeschoo...
Like us on Facebook: / mycodeschool
Follow us on twitter: / mycodeschool

Пікірлер: 258
@toruwalt
@toruwalt Жыл бұрын
9 years later, you are still impacting the life of a CS Student. Thanks alot 💗💗💗
@shaileshgande3875
@shaileshgande3875 7 жыл бұрын
This playlist of pointers is amazing... Can't find anything like this on Internet
@Elliskid1995
@Elliskid1995 3 жыл бұрын
Ikr
@sg8139
@sg8139 3 жыл бұрын
Exactly
@mason6300
@mason6300 2 жыл бұрын
They're really to the point!
@derkeiler2573
@derkeiler2573 Жыл бұрын
absolutly
@Greenndjdhdjjd
@Greenndjdhdjjd 5 ай бұрын
Really.This is a playlist of c programming we can rarely find.This person is an excellent person who have dived into the c programming.❤❤❤❤
@wildpasco
@wildpasco 4 жыл бұрын
2019 and your playlist is a gift for humanity
@charoniv5631
@charoniv5631 2 жыл бұрын
Rip humbleflow. You are a gift to us
@manikrai4827
@manikrai4827 8 жыл бұрын
Your series of lectures on pointers amazing. It cleared all my concepts and made pointers very easy for me.
@yesvee7377
@yesvee7377 3 жыл бұрын
This playlist must be archived so that it won't be lost, what a great work!
@Greenndjdhdjjd
@Greenndjdhdjjd 5 ай бұрын
Really.This is a playlist of c programming which I could rarely find.This person is an excellent person who have dived into the c programming.❤❤❤❤
@malikjavadov8515
@malikjavadov8515 3 жыл бұрын
2021 and you are still the best!!!!
@wikiblinkswikiblinks6600
@wikiblinkswikiblinks6600 4 жыл бұрын
You explain everything in a very simple and easy way to understand. You are really great and talented. It would be great if you could make a c++ full course that covers all the c++ language. For me it's much better than learning at the university from all teachers. Thank you so much. Please do the full course.
@adzpoweradel3228
@adzpoweradel3228 6 ай бұрын
RIP for him 😢
@oyebamijimustapha7846
@oyebamijimustapha7846 Жыл бұрын
Are you the one created C/C++,your explanation is too good.Thank you very much
@Greenndjdhdjjd
@Greenndjdhdjjd 5 ай бұрын
Although you were died,you are still alive in thousands of members heart including me, you are still aliving and saving our lives brother.Love you brother❤❤❤❤
@kathanvakharia
@kathanvakharia Жыл бұрын
Students in the 22nd century will also refer to this! Hats off to the best explanation
@medvfx3370
@medvfx3370 7 жыл бұрын
first indian video that actually helped me
@arthurlee8980
@arthurlee8980 5 жыл бұрын
hey now
@RussTeeTrombone
@RussTeeTrombone 5 жыл бұрын
Rare
@arcaneben9171
@arcaneben9171 5 жыл бұрын
There are a lot of small Indian youtubers who have some of the greatest tutorials on KZbin. They helped me so much during my Calculus and Physics classes. Not to mention this channel for CSE
@abeard1
@abeard1 5 жыл бұрын
@@arcaneben9171 Yes but there is so much Indian programming related material that some of them must be garbage
@miguelfajardo2731
@miguelfajardo2731 5 жыл бұрын
firts indian that i can understand. I'm latin, and my english is average, but understand this indian is very difficult.
@derkeiler2573
@derkeiler2573 Жыл бұрын
this is it!! Best explaining with all the possible ways to understand. Thank you so much
@stanmwadime
@stanmwadime Жыл бұрын
ALX introduced this channel to me. Never looked back since. My no. 0 guide for C.
@YouGenom
@YouGenom 9 жыл бұрын
Thanks for emphasizing the difference between with and without parenthesis in the declaration.
@pradip5046
@pradip5046 11 ай бұрын
These are immortal lectures. Every one of them. No one can replace. Period
@Greenndjdhdjjd
@Greenndjdhdjjd 5 ай бұрын
2024 you are still the best in You Tube for c programming friend😊😊❤❤
@wildpasco
@wildpasco 4 жыл бұрын
"High level language like C or Cpp" Men I come from javascript! I really appreciate your help with this video. Has made my transition very smoothly in computer science. Appreciated.
@chetanputtappanavar4176
@chetanputtappanavar4176 6 жыл бұрын
I wish I could have a teacher like you, sir. Thank you !!
@ChristianKrause89
@ChristianKrause89 10 жыл бұрын
That was such a clean explanation. Thank you.
@tsvmanojturlapati4492
@tsvmanojturlapati4492 2 жыл бұрын
ALMIGHTY BLESS YOU WITH ALL KINDS OF WEALTH
@peterdawson2276
@peterdawson2276 6 жыл бұрын
Love your work dude, one of the best educators I have watched.
@sasansalehi517
@sasansalehi517 9 ай бұрын
Look i have been looking for another thing and i see this and i now know that functions can return pointers in a easy way even my understanding of function pointers is better. Thank alot❤❤
@mycodeschool
@mycodeschool 11 жыл бұрын
char* means you have a data type that is pointer to character. Is this what you want to know? At what time in the video are you confused?
@rakeshramesh9248
@rakeshramesh9248 6 жыл бұрын
Name is ptr variable its expecting a address.. how are we passing a string then? Can someone explain?
@njegostrajkovic4451
@njegostrajkovic4451 4 жыл бұрын
​@@rakeshramesh9248 String is implemented as an array of characters in C. When you forward an array to a function, you actually forward the address of the first element of that array. So, &array[0] = array in C. In this case, you just forward the address of the first element of the array of characters, and that is your String.
@gammyhorse
@gammyhorse 3 жыл бұрын
@@njegostrajkovic4451 Did you mean &array[0] == array instead of &array[0] = array?
@123akash121
@123akash121 3 жыл бұрын
@@gammyhorse yea he was basically trying to say that &array[0] and array are equivalent and can be used interchangebly
@bhuvi441
@bhuvi441 9 жыл бұрын
simple and at the same time I understood the concept clearly ! Thank you so much :)
@safaltakagyan4747
@safaltakagyan4747 2 жыл бұрын
Thank you mycodeschool. I am learning a lot from you.
@bing4229
@bing4229 4 жыл бұрын
Hello, i have the same problem to understand void (*ptr)(char*). pointer function expects for an address as argument, but when it gets the address of "Tom", should in void function as output like this :printf("Hello %s " , *name); why here no * for name. thank you.
@shat104
@shat104 7 жыл бұрын
its crazy how much important pointers is in C++ but my professor just glossed over it like its nothing.
@inclinedscorpio
@inclinedscorpio 5 жыл бұрын
The Professor don't want to indulge themselves in pointer | Even some great programmers pull out their leg when pointers enter the room.
@romandedov5717
@romandedov5717 4 жыл бұрын
Inclined scorpio everybody is gangsta until pointers start walking in
@badcookie2975
@badcookie2975 4 жыл бұрын
@@inclinedscorpio lol yeah,everyone's a gangster until pointers come into the picture.
@peterpace3379
@peterpace3379 3 жыл бұрын
University professors don't know jackshit about teaching, so they just graze through the courses like they are nothing.
@vinayr5060
@vinayr5060 11 жыл бұрын
Really a nice turorial. clean and clear presentations. good job and thanks a lot
@alamgirhossien4004
@alamgirhossien4004 3 жыл бұрын
Great!That channel gives me strong programming foundation.
@shrinathbhoslay3014
@shrinathbhoslay3014 6 жыл бұрын
Thank you very much. Best tutorial on function pointers.
@bitsread7249
@bitsread7249 3 жыл бұрын
This guy is selected for heaven's list. Thank you so much!
@msaimadhav5040
@msaimadhav5040 3 жыл бұрын
He's already dead :(
@bitsread7249
@bitsread7249 3 жыл бұрын
Really? 😲
@Durgasivakumaran
@Durgasivakumaran 5 жыл бұрын
Really appreciated. Pls upload more. Very clearly explained. Thanks for efforts.
@albinarusta9051
@albinarusta9051 6 жыл бұрын
Thank you for such a clear explanation! you're the best!
@adityaojha2701
@adityaojha2701 3 жыл бұрын
I wish I could meet this legend one day.
@danieljbuyinza
@danieljbuyinza Жыл бұрын
OUTSTANDING EXPLANATION! 🙌
@dohoudanielfavour
@dohoudanielfavour Жыл бұрын
Splendid explanation even after years. Thanks a lot boss.
@trainchen9861
@trainchen9861 3 жыл бұрын
Full of knowledge but still compact! Great!
@roshenw
@roshenw 11 жыл бұрын
Thank you. you save lives with your teaching skils.!
@ramfattah211
@ramfattah211 11 ай бұрын
Thank you Harsha Suryanarayana AKA humblefool. RIP Legend.
@wheatonrecurrence9525
@wheatonrecurrence9525 3 жыл бұрын
It's 2021 and this is still the best
@AkamiChannel
@AkamiChannel 2 жыл бұрын
Man this is wayyy more than just function pointers. Will probably help a lot of people tho
@pratyushrath1457
@pratyushrath1457 6 жыл бұрын
I don't understand what you did in the last. How can char* which is pointer to char store string tom??
@DoctorDARKSIDE
@DoctorDARKSIDE 9 жыл бұрын
Very nicely explained! Thanks!!!
@fb767
@fb767 11 жыл бұрын
For example at 11:50, under main you have void (*ptr)(char*); I don't understand why the asterisk is following the char, yet it's before the ptr. Thank you.
@adityaojha2701
@adityaojha2701 3 жыл бұрын
here ptr is pointer variable and char is pointer datatype.
@racerx1326
@racerx1326 10 жыл бұрын
you are amazing. thank you so much. you are the best at explaining. your so concise, and clear.
@sanjayreddy704
@sanjayreddy704 8 жыл бұрын
you are simply best. Simple and superb explanation
@Naveen-ef2dg
@Naveen-ef2dg 6 жыл бұрын
Really lucky to find this channel
@陈东宇
@陈东宇 7 жыл бұрын
I love how you say "RRRRRRRRRRRRRAM" ;)
@kchopra5336
@kchopra5336 6 жыл бұрын
you must be saying LAM :P
@arjunreddy3996
@arjunreddy3996 6 жыл бұрын
hahahahahah
@darkinferno4687
@darkinferno4687 6 жыл бұрын
xD
@Greenndjdhdjjd
@Greenndjdhdjjd 5 ай бұрын
You are a gem for me❤❤❤❤
@AmareshBeuria
@AmareshBeuria 9 жыл бұрын
Thank You for explaining the concept in such an amazing manner.
@greymind0072
@greymind0072 4 жыл бұрын
why this dude stopped uploading more new videos on coding stuff....the guy is fucking amazing when comes to teaching programming things
@Derbb
@Derbb 2 жыл бұрын
He died a few years back :/
@asadanees781
@asadanees781 6 жыл бұрын
Really nice explaining and good quality video
@ankitsaurabh5459
@ankitsaurabh5459 Жыл бұрын
One of the best videos
@BharathRamMS
@BharathRamMS 3 жыл бұрын
Thank you very much for this wonderful lesson!
@rohitdarveshiyt
@rohitdarveshiyt 8 жыл бұрын
thank you very much for this work.
@william9496
@william9496 4 жыл бұрын
You are a gift from life
@oguzkale1278
@oguzkale1278 10 жыл бұрын
Extremely clean explanation. Thank you ! :)
@laurentb6563
@laurentb6563 5 жыл бұрын
this was well explained, thanks
@ganeshchandra2951
@ganeshchandra2951 7 жыл бұрын
You are awesome. i am in love with your teaching
@tigernaman
@tigernaman 10 жыл бұрын
it is a best tutorial you make my concept clear thanks, i am waiting for new tutorial.
@ShopperPlug
@ShopperPlug 2 жыл бұрын
This is interesting, creating "function pointers" which are pointing to a function's address. Never knew such concept existed. I have a question, does it matter if the function pointer points to the function prototype or function definition? Thanks.
@nishigandhapatil6484
@nishigandhapatil6484 7 жыл бұрын
nicely explained.. subtitles makes us understand more clearly.☺
@ronaldromain3166
@ronaldromain3166 2 жыл бұрын
Excellent guidance, Thank you
@royceguo9675
@royceguo9675 6 жыл бұрын
In C, it's allowed primarily because there's not much else the name of a function, by itself, could mean. All you can do with an actual function is call it. If you're not calling it, the only thing you can do is take the address. Since there's no ambiguity, any time a function name isn't followed by a ( to signify a call to the function, the name evaluates to the address of the function. --recite from stackoverflow
@leixun
@leixun 4 жыл бұрын
*My takeaways:* 1. What is a function pointer 1:30 2. How to create a function pointer 6:25 3. Function pointer vs function that returns a pointer 8:39
@reddiredd3
@reddiredd3 Жыл бұрын
Perfect tutorial
@Jonathan-ru9zl
@Jonathan-ru9zl 2 жыл бұрын
it just proves that we don't necessarily need university degree today when we have those great stuff available.
@easonzheng3220
@easonzheng3220 8 жыл бұрын
Awesome explanation. I've seen the point in this. Thank u.
@devn0n
@devn0n 2 жыл бұрын
This is just beautiful broo
@nhantontrong5255
@nhantontrong5255 6 жыл бұрын
omg....great! easy to understand....thank you so much
@yogipro183
@yogipro183 2 жыл бұрын
Where have you gone 😞..man!
@zbera97
@zbera97 6 жыл бұрын
Amazing explanation. Thanks so much.
@Vaib_agg
@Vaib_agg 9 жыл бұрын
thank u sir u have cleared my doubts bt one thing i haven't understood is that why have u changed c to *ptr in main if we use *c then what will be the difference
@anondoggo
@anondoggo 5 жыл бұрын
This is so helpful. Thank you!!
@RichardMaidenCG
@RichardMaidenCG 2 жыл бұрын
Thank you so much for your videos, they are really awesome :)
@bagaspermana88
@bagaspermana88 3 жыл бұрын
Great Explanation!
@aswin2pranav
@aswin2pranav 8 жыл бұрын
Thank you so much... Real gratitude.
@mrunphotography
@mrunphotography 11 ай бұрын
Best explanation
@karthikanair644
@karthikanair644 7 жыл бұрын
Very much understandable. Thank you
@roxxane4788
@roxxane4788 6 жыл бұрын
You are taking a pointer to a string "Tom". I did not understood how is it printing without using a loop?
@ravi-mo6js
@ravi-mo6js 6 жыл бұрын
Roxxane Bcs he used %s, which means print all characters until u see'\0'.
@mrbilalkhan
@mrbilalkhan 7 жыл бұрын
Amazing tutorial. thanks for the upload.
@HK-no9wm
@HK-no9wm 6 жыл бұрын
Amazing explanations. Thank you for taking time out to help. And can plz you please do video lectures on computer archeitecture?
@JayPatel-zu5pj
@JayPatel-zu5pj 2 жыл бұрын
Conversion of string to char* is not allowed in C++, so this works void printNum(const char* a){ cout
@martianpirate9657
@martianpirate9657 4 жыл бұрын
Doubt at 11:10, How come PrintHello acts as a call to function without having the brackets at the end () needed to define a function. Also at 11:36 how is "Tom" getting printed.
@AlyMabrouk2012
@AlyMabrouk2012 3 жыл бұрын
thanks, very informative
@casualgamer1097
@casualgamer1097 5 жыл бұрын
ALBERT IS BACK !!!!!!!!
@omarqasim7516
@omarqasim7516 4 жыл бұрын
what program name that used to design this lesson ?
@socialmedia3650
@socialmedia3650 3 жыл бұрын
Thank you, sir.
@prajaktajagtap8699
@prajaktajagtap8699 8 жыл бұрын
very nicely explained..thank you sir
@shrishailctalukar
@shrishailctalukar 7 жыл бұрын
Your explain concisely. Keep up (:
@morampudiakhil516
@morampudiakhil516 4 жыл бұрын
Great Video and good explanation! But why do we use function pointers?
@jenkov2155
@jenkov2155 8 жыл бұрын
Excellent video, thanks.
@ulysses_grant
@ulysses_grant 7 жыл бұрын
Amazing didatics! Thanks so much sir!
@TheBigBawsss
@TheBigBawsss 6 жыл бұрын
this is beautiful ... very clear
@trilecao9014
@trilecao9014 3 жыл бұрын
Thanks from 1:31 to 4:13
@naveenbhatt6832
@naveenbhatt6832 8 жыл бұрын
Great work man! keep it up, just great.
@XieQiu
@XieQiu 8 жыл бұрын
great video. thanks for posting this!
@Roocky515
@Roocky515 10 жыл бұрын
cant avoid comment its superb.....
@vikranthbandi5833
@vikranthbandi5833 4 жыл бұрын
then about the void function generally we store the pointers in the integer format then what should we do???
Function pointers and callbacks
15:19
mycodeschool
Рет қаралды 334 М.
Dynamic memory allocation in C - malloc calloc realloc free
17:35
mycodeschool
Рет қаралды 882 М.
English or Spanish 🤣
00:16
GL Show
Рет қаралды 17 МЛН
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 43 МЛН
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 14 МЛН
Function Pointers in C++
12:41
The Cherno
Рет қаралды 388 М.
Pointers as function arguments - call by reference
14:16
mycodeschool
Рет қаралды 485 М.
Function Pointers | C Programming Tutorial
18:31
Portfolio Courses
Рет қаралды 60 М.
Why Function Pointers are Awesome
11:11
Jacob Beningo
Рет қаралды 7 М.
What does int argc, char* argv[] mean?
10:11
Paul Programming
Рет қаралды 351 М.
Understanding C program Compilation Process
6:04
HowTo
Рет қаралды 374 М.
What is the Difference Between a Pointer and a Reference C++
7:58
Paul Programming
Рет қаралды 431 М.
Arrays as function arguments
12:54
mycodeschool
Рет қаралды 376 М.
English or Spanish 🤣
00:16
GL Show
Рет қаралды 17 МЛН