Is using if (0) to skip a case in a switch supposed to work?

As other answers have mentioned, this is technically allowed by the standard, but it is very confusing and unclear to future readers of the code.

This is why switch ... case statements should usually be written with function calls and not lots of inline code.

switch(i) {
case 0:
    do_zero_case(); do_general_stuff(); break;
case 1:
    do_one_case(); do_general_stuff(); break;
case 2:
    do_general_stuff(); break;
default:
    do_default_not_zero_not_one_not_general_stuff(); break;
}

Yes, this is supposed to work. The case labels for a switch statement in C are almost exactly like goto labels (with some caveats about how they work with nested switch statements). In particular, they do not themselves define blocks for the statements you think of as being "inside the case", and you can use them to jump into the middle of a block just like you could with a goto. When jumping into the middle of a block, the same caveats as with goto apply regarding jumping over initialization of variables, etc.

With that said, in practice it's probably clearer to write this with a goto statement, as in:

    switch (i) {
    case 0:
        putchar('a');
        goto case2;
    case 1:
        putchar('b');
        // @fallthrough@
    case2:
    case 2:
        putchar('c');
        break;
    }

Yes, this is allowed, and it does what you want. For a switch statement, the C++ standard says:

case and default labels in themselves do not alter the flow of control, which continues unimpeded across such labels. To exit from a switch, see break.

[Note 1: Usually, the substatement that is the subject of a switch is compound and case and default labels appear on the top-level statements contained within the (compound) substatement, but this is not required. Declarations can appear in the substatement of a switch statement. — end note]

So when the if statement is evaluated, control flow proceeds according to the rules of an if statement, regardless of intervening case labels.