Pointer are powerful stuff in C programming. You get direct access to variable address. VOID POINTERS are special type of pointers. They can take address of any kind of data type - char, int, float or double. And you can also get the value back from void pointers.
In this video we will see how to convert the fundamental data type of C into void pointer and then retrieve the value back.
This video assumes that you have some knowledge of C programming. If you are new to C and want to learn the language then I will suggest you to read any of the following books
The C Programming Language by Kernighan and Ritchie
ANSI C Balaguruswamy
The Complete Reference C by Herbert Schildt
0:05 char to void pointer and reverse
0:10 Declaring and initializing char variable ch
0:20 Declaring void pointer variable v
0:30 Assigning the address of variable ch to void pointer v
0:45 Declaring char variable p that takes the value of ch through void pointer v
1:12 Printing the value of ch which is now stored in p
1:27 Compile and Run program
1:36 int to void pointer and reverse
1:44 Declaring and initializing int variable i
1:52 Declaring void pointer variable v
1:59 Assigning the address of variable i to void pointer v
2:14 Declaring int variable p that takes the value of i through void pointer v
2:34 Printing the value of i which is now stored in p
2:52 Compile and Run program
2:59 float to void pointer and reverse
3:06 Declaring and initializing float variable f
3:15 Declaring void pointer variable v
3:19 Assigning the address of variable f to void pointer v
3:32 Declaring int variable p that takes the value of f through void pointer v
3:55 Printing the value of f which is now stored in p
4:12 Compile and Run program
4:19 double to void pointer and reverse
4:25 Declaring and initializing double variable d
4:35 Declaring void pointer variable v
4:40 Assigning the address of variable d to void pointer v
4:52 Declaring int variable p that takes the value of d through void pointer v
5:16 Printing the value of d which is now stored in p
5:32 Compile and Run program
You can download the project code from my GitHub repository
https://github.com/yusufshakeel/C-Pro...
Смотрите видео 07 C | How to convert void pointer into char int float double онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Yusuf Shakeel 01 Март 2014. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 17,198 раз и оно понравилось 90 посетителям.