1)can we define a void pointer?
such as void * pointer;
is it allowed in C? what is a void pointer?
2) I always hear about Global Variable, but I do not know how to define Global Variable, I mean where to define a Global Variable? in the beginning of a file or what?
1)can we define a void pointer? such as void * pointer; is it allowed
Share
A void pointer is a pointer to any type. A void pointer can be cast to any type and a pointer to any type can be cast to a void pointer.
A global variable is a variable available to all functions in your program (whereas a local variable is available only within the function it’s created). A global variable can be declared outside of any function, though typically they’re declared right before the main() function. Groups of global variables can be defined at once.