[ create a new paste ] login | about

Link: http://codepad.org/vSzZLPoM    [ raw code | output | fork ]

PhoeniX888 - C, pasted on Aug 13:
//Implementing Hash Table

#include "stdio.h"
void fa()
{ 
  printf("a\n");
}

void fz()
{ 
  printf("it's z!\n");
}

typedef void (*F)();
F table[2]={fa,fz};

int main()
{
   int c;
   c = 1;
   //scanf("Enter the function to call-->%d" ,&c );
   table[c]();
   return 0; 
}


Output:
1
it's z!


Create a new paste based on this one


Comments: