What is the purpose of anonymous { } blocks in C style languages (C, C++, C#)
Example -
void function() { { int i = 0; i = i + 1; }
By creating a new scope they can be used to define local variables in a switch statement.
e.g.
switch (i) { case 0 : int j = 0; // error! break;
vs.
switch (i) { case 0 : { int j = 0; // ok! } break;