[ create a new paste ] login | about

Link: http://codepad.org/rTAActCN    [ 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
18
19
#include<stdio.h>

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

default :
break;
}   
return 0;

}


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


Create a new paste based on this one


Comments: