answersLogoWhite

0

What are void pointers?

User Avatar

Wiki User

โˆ™ 2008-07-21 20:32:49

Best Answer

They are pointers without type

User Avatar

Wiki User

โˆ™ 2008-07-21 20:32:49
This answer is:
User Avatar
Study guides

What are advantages of Database Approach

What is a network that covers a large geographical area such as a city country or world

What is the worlds largest wan

What is a network server

โžก๏ธ
See all cards
4.13
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
188 Reviews

Add your answer:

Earn +20 pts
Q: What are void pointers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Types of pointers in c?

You can define pointers to every data-type (including elementary types, structures, unions, arrays and function), plus you can define generic pointers as 'void *'.


How do i call a function using pointer to the array of function pointers?

typedef void (*myfunptr)(void);extern void fun1 (void), fun2 (void), fun3 (void);myfunptr ptrs[] = {fun1, fun3, fun3};ptrs[0]();ptrs[1]();...


What is the size of void data type?

Data-type void has some special features:- it doesn't have values- it doesn't have size- you cannot declare variables with it- void *pointers cannot be dereferenced


What is the meaning of void array op in c plus plus?

A void array is an array of unknown type. That is, it is an array of pointers to unknown data types (void*). A void array op is an operation that returns a void array. Void arrays are commonly found in C code but are rarely encountered in C++.


What are the types of pointers in C plus plus?

Pointer variables and function pointers are the two primary types, as well as a void pointer (unknown type). Pointer variables can point to any valid type, including primitive types and user-defined types, as well as other pointer variables. Function pointers can point to any function with the same signature as the function pointer itself. Void pointers can point anywhere.


Function pointers example programs?

A pointer which keeps address of a function is known as function pointer. example: { void *(*ptr)(); ptr= &display; (*ptr)(); return(0); } void display() { .................. )


How do you return array of pointers?

Example: int **myfun (void) { int **myptr= calloc (sizeof (int *), 100); return myptr; }


What is the difference between null and void pointers?

A void pointer is a pointer that has no type information attached to it.A null pointer is a pointer that points to "nothing". A null pointer can be of any type (void included, of course).


Give the syntax to declare two dimensional array using array of pointers?

It is not possible to declare a two-dimensional array using an array of pointers in any programming language, but many programming languages support declarations of N-dimensional arrays of pointers.The exact syntax varies with the programming language, and requires support for N-dimensional arrays and pointers. In C, the following declares an array of pointer variables, each implemented as pointer to the generic type "void":void* array_1D[10];The type of the expression array_1D is "void * const."The following example expands on the previous one by declaring a two-dimensional array of "void" pointers:void* array_2D[10][20];The type of the expression array_2D is "void ** const."The last example declares a 3-dimensional array of "void" pointers, which can be seen as a 2-dimensional array of arrays of pointers:void* array_3D[10][20][30];


Difference between void pointer and null pointer?

A Null pointer has the value 0. void pointer is a generic pointer introduced by ANSI. Before ANSI, char pointers are used as generic pointer. Generic pointer can hold the address of any data type. Pointers point to a memory address, and data can be stored at that address.


What is generic pointer?

Generic pointers are pointers of the type void*. They can point to any object, but you cannot dereference a void* nor can you perform pointer arithmetic because the compiler won't know the runtime type of the object you are actually pointing at. It's up to you to determine the proper runtime type and then cast the pointer to the appropriate pointer type.


What is void data type work in c?

Void is not relay a data type as there is no size of storage associated with it where as char, int, long, float etc have a specific size (how many bytes are required to store the variable in). When it comes to pointers void is the universal pointer. When void is used as a function argument in a function prototype. void foo(void) The first void means that the function does not return a value. The second void means that there are no function arguments for the function. This should not be confused with. void* bar(void *) Bar returns a pointer of type void and receives an argument of a void pointer.

People also asked