function pointer

Simple C Function Pointer Example

Blog tags: 

Here is a simple function pointer example I wrote for one of my friends just learning to program in C - it should be easy to follow:

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

typedef void (*ledFuncPtr) (int[], int);

void myFunctionTest(int pins[], int size)

        int i = 0;
        for (i = 0; i <= size; i++) {
                printf("val: %d\n", pins[i]);

Subscribe to RSS - function pointer