What is the purpose of void pointer?



What is the purpose of void pointer?..

Answer / Brahmpal Singh

"A void pointer in C is a pointer that can point to any data type. It is useful when we don't know the data type of the variable at compile time, but we need to manipulate the memory location it points to. The void keyword ensures that the compiler does not assume any specific type for the pointer."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Can include files be nested? How many levels deep can include files be nested?

1 Answers   Aspire, Infogain,


difference between loading and linking

1 Answers  


write a program that prints a pascal triangle based on the user input(like how many stages) in an efficient time and optimized code?

3 Answers   Oracle,


How to compare array with pointer in c?

1 Answers  


What is the Difference between Class and Struct?

10 Answers   Motorola,


What does static variable mean in c?

1 Answers  


What are the difference between a free-standing and a hosted environment?

1 Answers   Infogain,


int main() { int i=1; switch(i) { case '1': printf("hello"); break; case 1: printf("Hi"); break; case 49: printf("Good Morning"); break; } return 0; }

3 Answers  


What is the mean of this statement:: if(int i=0 * i=9)

2 Answers   HCL,


what is the difference between c and c++?

7 Answers  


What is variable in c example?

1 Answers  


dennis ritchie invented C language in AT&T bell laboratory what is the extension of AT&T?

4 Answers  


Categories