Afficher un message
Vieux 21/10/2007, 12h00   #1
Srinu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Variable declaration inside a switch statement.

Hi all,

If we compile the below piece of code, it gets compiled. But gives
weird result.

switch(x)
{
int y=2;

case 1:
printf("%d", y);
}


What, if any, the C standard says about it?

Srinu.

  Réponse avec citation
 
Page generated in 0,05444 seconds with 9 queries