Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char *argv[])
- {
- void *jmp[] = { &&label0, &&label1, &&label2 };
- if(argc > 1) {
- unsigned lbl = atoi(argv[1]);
- if(lbl < 3)
- goto *jmp[lbl];
- }
- puts("none");
- return 0;
- label0:
- puts("zero");
- return 0;
- label1:
- puts("one");
- return 0;
- label2:
- puts("two");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement