A void pointer can hold address of any type
if the pointer know the address of another variable, then we can change the value store in that address by pointer dereference
In a code ptr hold the address of variable a
how to modify value of a ?
error invalid use of void expressionCode:#include<stdio.h> int main() { int a = 10; void *ptr = &a; printf("%d", *(int *)ptr); *ptr = 12; printf("%d", *(int *)ptr); return 0; }