[ create a new paste ] login | about

Link: http://codepad.org/YiyLQTYw    [ raw code | output | fork ]

C, pasted on Dec 18:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<stdio.h>

int main(int argc,char *argv[])
{
int a =1;
switch(a)
{
case 1: int x=10;
        printf(" x is %d",x);
break;

default :
break;
}   
return 0;

}


Output:
1
2
3
4
5
In function 'main':
Line 8: error: expected expression before 'int'
Line 9: error: 'x' undeclared (first use in this function)
Line 9: error: (Each undeclared identifier is reported only once
Line 9: error: for each function it appears in.)


Create a new paste based on this one


Comments: