Q:

What is void or generic pointers in C?

0

What is void or generic pointers in C?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

A void pointer in c is called a generic pointer, it has no associated data type. It can store the address of any type of object and it can be type-casted to any type. According to C standard, the pointer to void shall have the same representation and alignment requirements as a pointer to a character type. A void pointer declaration is similar to the normal pointer, but the difference is that instead of data types we use the void keyword.

Syntax:

void * Pointer_Name;

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Embedded C interview questions and answers (2022)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is the advantage of a void pointer in C?... >>
<< Write a program to count set bits in an integer?...