[ create a new paste ] login | about

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

C, pasted on Jun 29:
1
2
3
4
5
6
7
8
9
10
11
12
13
void main(vodi){
 int a, n=3;
 a=func(n+2);
 printf("%d",a);

}

int func(n){
 int n,fun;
 fun=n*n;
 retrun fun;

}


Output:
1
2
3
4
5
6
7
8
9
In function 'main':
Line 2: warning: return type of 'main' is not 'int'
In function 'func':
Line 10: error: 'n' redeclared as different kind of symbol
Line 9: error: previous definition of 'n' was here
Line 12: error: 'retrun' undeclared (first use in this function)
Line 12: error: (Each undeclared identifier is reported only once
Line 12: error: for each function it appears in.)
Line 12: error: expected ';' before 'fun'


Create a new paste based on this one


Comments: