Question: I just wanted to know the various reasons that might affect the size of a function pointer from memory perspective.

I'd like to emphasize that my question isn't about how functions pointers could be used and how they could be type-cast. It's just about if I declare a function pointer like

```
 int (*fptr)(int, int);

```

and create a variable of it

```
fptr fun1;

```

what is the size I'm expected to get if I run it on a 32/64 bit machine?

Is it possible to determine the size of a function pointer simply by looking at its declaration, like I could tell a void pointer would size 4 bytes on a 32-bit machine.

Answer: 
Rango, look [here](https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros):

```
__SIZEOF_POINTER__ // Pre-defined GCC macro

```

and for MS Visual C/C++ compiler you can check macro `_WIN64`, `_M_IX86` and others that indicate target processor architecture. Full list [here](https://msdn.microsoft.com/en-us/library/b0084kay.aspx). 

P.S. After some thinking I have to admit that my statement that function pointer will have the same size as `void*` was wrong (I can imagine architectures where memory for data and for code may be addressed differently). Anyway, as for the question *"Is it possible to determine the size of a function pointer"* and taking into account clarification I got in the comment that OP works with gcc, `__SIZEOF_POINTER__` may serve as an answer. Although answer provided by @2501 in their comment is much better - `sizezeof(fptr)` should work with any compiler
A pointer has only one size. It does not matter what it points to. It is large enough to hold the address of a location in the process's virtual memory that can be accessed. This is typically 64 bits (8 bytes) on current CPUs and 32 bits on older ones.