Add master-algorithm-with c example code