answersLogoWhite

0

*function();
this declares a pointer function!

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do declare function pointer having two integer parameters and returning integer pointers?

// declare a function int* function(int, int); or int* (function)(int, int); // declare a pointer to a function int* (*pointer_to_function)(int, int);


What is the difference bw function pointer and function of pointer?

function pointer is a variable that hold the address of any function which declared in the program but function pointer is the array of the function that accept the run time size of the function.


What is the difference between a function pointer and a pointer to a function?

A pointer to a function is the memory address that stores the address of a function, while the pointer itself is a function pointer.A pointer to a function might be defined as "int (*pf)(int, int);", while to actually point to the function, you would use a function pointer, such as "pf = &func;".


How do you declare pointer in c?

ujkjkyjljlui kukhjkui


How do you declare a pointer variable in c?

int* pint; // instantiate a pointer to an int. float* pflt; // instantiate a pointer to a float.


Can a pointer be considered a variable?

You can declare pointer-variables, if that's what you mean. Example: char *sample = "Sample";


How do you declare a pointer to a character string in c?

char *ptr;


C program pointers to pointers examples?

Pointer to Pointer is a double pointer, denoted by (**). Pointer stores the address of the variable and pointer to pointer stores the address of a pointer variable and syntax can be given as int **ptr2ptr;


Declare the variable longPtr to be a pointer to an object of type long?

long *longPtr;


Is void a data type in c?

what is void data type Void is an empty data type normally used as a return type in C/C++, C#, Java functions/methods to declare that no value will be return by the function. The another use of void is to declare the pointer in C/C++ whe It is not sure that what data type will be addressed by the pointer. eg: void *p; Here p can hold the address of int or float or char or long int or double.


Pointer to pointer in c?

Usable. A prominent example is param argv of function main.


What does the C statement int open parenthesis asterisk f close parenthesis open parenthesis int asterisk close parenthesis declare?

The declaration int (*f) (int*); declares a function pointer named f. The function pointer can be assigned the address of any function that accepts a pointer to int and returns an int. Function pointers can be used to pass functions to functions. Normally we use typedefs to simplify the notation of function pointers: typedef int (*f) (int*); int x (int*); int y (int*); f fp; // declare a function pointer of type f int z = 42; fp = x; // point to the x function fp (&z); // invoke function via pointer fp = y; // point to the y function fp (&z); // invoke function via pointer. A typical usage of function pointers is to provide a predicate for a comparison sort algorithm. This makes it possible for the same sorting algorithm to compare objects using different predicates. For example: typedef bool (*pred) (int, int); // function pointer type named pred void sort (int a[], size_t len, pred func) { // simple shell sort for(int i=len/2; i>0; i=i/2) { for(int j=i; j<len; j++) { for(k=j-i; k>=0; k=k-i) { if( !func (a[k+i], a[k]) // invoke the predicate function { swap (a[k], a[k+i]); } } } } } // Declare predicates... bool less_than (int a, int b) { return a<b); bool greater_than (int a, int b) { return a>b; } int main () { int x[] = {3,5,2,4,1}; sort (x, 5, less_than); // sort array of 5 elements in ascending order sort (x, 5, greater_than); // sort array of 5 elements in descending order return 0; }