Skip to main content

Posts

Showing posts from May, 2017

Function Pointer In C

Function Pointers in C Function Pointer that refers to the address of other function.   We will passed variable, constants, structure variables to a function as argument. But have you ever tried or thought to pass a function as an argument to another function . If not, then let us do it together. At first sight it may appear a bit confusing to you but trust me it is as simple as writing “int main()”. It is used to pass the function address to the another function or create the array of function or create function inside the structure  or create call back function used in layered software like AUTOSAR. Function_pointer_in_C                             Syntax : return_type(*pointer_name)(function_argument) example : void (*foo) (void); now foo can point to any function it should have return type of void and argument type is void. int add(int a , int b) { return a+b; } now i want to create varia