Re: Variable declaration inside a switch statement.
On Oct 21, 4:00 pm, Srinu <sinu.nayak2...@gmail.com> wrote:
> 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.
Can u tell me what weird results it gives ?
|