►C Programming playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd8M-Mi_Vyrg7KgISTW3Sklt
►Find full courses on: https://courses.mshah.io/
►Join as member to get perks: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join
►Lesson Description: In this lesson I show you how to use the void* pointer in C. void* is a very powerful feature that allows us to do generic programming. With void* we have to use extra caution however, to make sure we dereference to the proper type that we point to however. In this lesson I also show you how to point to function pointers as well, and then call the function. This is very useful in more 'event-driven' applications, or otherwise if you'd want to write a function that can take any type of function as a parameter for example. Finally, I'll show you that you have been using void* all along in malloc.
00:00 introduction
00:24 Pointer review
1:40 void* (Generic Pointer introduced)
3:12 void* to variable
5:15 void* to a void function with no arguments
9:00 void* to a function with a return value
10:20 void* to a function with a return value and arguments
11:50 malloc as an example returning void*
12:45 Conclusion
►Please like and subscribe to help the channel!
►YouTube Channel: https://www.youtube.com/c/MikeShah
►Join our free community: https://courses.mshah.io/communities/Q29tbXVuaXR5LTI3MzAz