in Technology by
What is void or Generic pointers in C?

1 Answer

0 votes
by

A void pointer is 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;

Related questions

+1 vote
    What is the advantage of declaring void pointers in C-Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    What ais the use of void pointers?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    What is the advantage of declaring void pointers?...
asked Jan 17, 2021 in Technology by JackTerrance
0 votes
    What is the advantage of a void pointer in C?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    What is the size of a void pointer in C?...
asked Jan 21, 2021 in Technology by JackTerrance
0 votes
    Which is a valid declaration within an interface? A)protected short stop = 23; b)final void madness(short stop); ... (double duty);? Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    How is Pointers subtraction in C?...
asked Jan 24, 2021 in Technology by JackTerrance
0 votes
    When should we use pointers in a C program?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    What is the advantage of pointers in C?...
asked Jan 22, 2021 in Technology by JackTerrance
+1 vote
    What are valid operations on pointers in C Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    Describe Wild Pointers in C Progamming?...
asked Nov 8, 2020 in Technology by JackTerrance
0 votes
    Is there a side effect in doing this: C code: struct foo { int k; }; int ret_foo(const struct ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 13, 2022 in Education by JackTerrance
0 votes
    An ____________ consists of a search-key value and pointers to one or more records with that value as ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    Which of the following tag represents a generic document or application section in HTML5? A - section B - article C - aside D - header...
asked Dec 1, 2020 in Technology by JackTerrance
0 votes
    I have a generic method defined like this: public void MyMethod(T myArgument) The first thing I want to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
...