Void * Pointer in C


The void pointer in C is a pointer which is not associated with any data types. It points to some data location in the storage means points to the address of variables. It is also called general purpose pointer. In C, malloc() and calloc() functions return void * or generic pointers.

Source Code

//Generic Pointer or Void Pointers
#include<stdio.h>
int main()
{
    int a[]={10,20,30,40,50};
    void *p;
    p=a;
    //printf("\n *p : %d",*p);
    printf("\n *p : %d",*(int *)p);
    return 0;
}
 
 
 
To download raw file Click Here

List of Programs


Sample Programs


Switch Case in C


Conditional Operators in C


Goto Statement in C


While Loop Example Programs


Looping Statements in C

For Loop Example Programs


Array Examples in C

One Dimensional Array


Two Dimensional Array in C


String Example Programs in C


Functions Example Programs in C


Learn All in Tamil © Designed & Developed By Tutor Joes