// function_pointer_first_test.c - a tiny demo that shows the
//                                 principle of function pointers

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

void displayVariantOne(char *text);
void displayVariantTwo(char *text);

//------------------------------------------------------------
int main()
{
  void (*display_function)(char *text);

  display_function = displayVariantOne;
  display_function("a text");

  display_function = displayVariantTwo;
  display_function("a text");

  return(0);
}

//------------------------------------------------------------
void displayVariantOne(char *text)
{
  printf("\n%s\n",text);
}

//------------------------------------------------------------
void displayVariantTwo(char *text)
{
  printf("\n***********\n%s\n***********\n",text);
}
