void type pointer

Preview

void pointer

In C language we can also declare a void type pointer variable. void type pointer variable can contain address of variable of any other data type .


Program of void pointer.
#include<stdio.h>
int main()
{
int var1=20;
void *var2;
var2=&var1;
printf(“var2=%u”,var2);
return(0);
}
Output
var2=65524



Best Books of C





Lesson tags: void pointer in c, void type pointer variable in c
Back to: C Programming Language