[ create a new paste ] login | about

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

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

void neverExecuted() { puts("never\n"); }
void executed() { puts("executed\n"); }

int main(){

int c = 1;

switch(c) {
default: neverExecuted(); break;
default: executed(); 
}


return 0;
}


Output:
1
2
3
In function 'main':
Line 13: error: multiple default labels in one switch
Line 12: error: this is the first default label


Create a new paste based on this one


Comments: