The most similar is probably this: > #include <stdio.h> > > void test(int which) > { > switch (which) > { > case 1: > printf("print1\n"); > case 2: > printf("print2\n"); > } > } > > int main () > { > test(1); > test(2); > > return 0; > }
The most similar is probably this: > #include <stdio.h> > > void test(int which) > { > switch (which) > { > case 1: > printf("print1\n"); > case 2: > printf("print2\n"); > } > } > > int main () > { > test(1); > test(2); > > return 0; > }