VoidVoid

We've already seen void when we studied functions that return nothing or simply print text to the screen.

Also, remember that we cannot create a variable of type void. But we can create a void* pointer that points to some memory.

Note

If you've done the lesson practice with pointers, you already know that all pointers take 8 bytes. A pointer of type void* is no exception.

A pointer of type void* does not belong to any of the data types. This means that we can store absolutely any type of address in it.

There's a problem: we can't dereference a pointer like void*.

Note

For the same reason why you can't make variables of type void.

Do an explicit type conversion!

c

Main.c

Congratulations, you have completed a basic course in the C programming language. If you want to further develop in this exciting and logical programming language, I strongly recommend that you familiarize yourself with macros, sorting algorithms, and data structures and try to learn one of the Linux distributions - this is the basic set of any serious C programmer.

Good luck!

Everything was clear?

Section 6. Chapter 6