Pointers and functions in c

Insane Coder

Please consider the following code

#include<stdio.h>
int fun(); /* function prototype */

int main()
{
    int (*p)() = fun;
    (*p)();  
    return 0;
}
int fun()
{
    printf("IndiaBix.com\n");
    return 0;
}

What is int(*p)() here?Is it a function,variable or what?

P0W

Flow spiral rule :

                 +------+
                 |      |
                 |  +-+ |
                 |  ^ | |            
             int ( *p ) ()
               ^ |    | |
               | +----+ |
               +--------+

               Identifier p
                 is a pointer to..
                 is a pointer to a function  
                 is a pointer to a function returning int

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

pointers to functions in c++

From Dev

Functions and pointers in C

From Dev

pointers to functions in c++

From Dev

C functions pointers

From Dev

Functions and pointers in C

From Dev

Functions and function pointers in C++

From Dev

array of pointers as argument in c functions

From Dev

Trouble with pointers and functions in C++

From Java

Polymorphism in c++ - Access functions over pointers

From Dev

Representing NULL Function Pointers to C Functions in Swift

From Dev

C function pointers assigned to functions with a different signature

From Dev

passing struct pointers to functions c++

From Dev

error using pointers in functions c++

From Dev

HOW TO: Class functions pointers (C++)

From Dev

scope of the variable in c using pointers and functions

From Dev

Can functions and function pointers be used in ObjC just as they are in C?

From Dev

Unit-testing functions with void pointers in C++

From Dev

Vector of pointers to member functions with multiple objects c++

From Dev

Is there a rule of thumb on using pointers or references as return types of functions in C++?

From Dev

passing pointers through multiple functions from main() C++

From Dev

Array of Function-Pointers with different functions return value (in C)

From Dev

C++: Vector of function pointers to functions with different type of arguments

From Dev

C# pointers on pointers

From Dev

Passing pointers to functions with and without &

From Dev

Pointers in pure functions

From Dev

Handling Functions and Pointers

From Dev

How to understanding pointers in functions

From Dev

Smart pointers in functions

From Dev

Sum of Arrays and Pointers with Functions

Related Related

HotTag

Archive