[ create a new paste ] login | about

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

C, pasted on Jan 15:
1
2
3
4
5
6
7
8
9
10
11
12
#include<stdio.h> 
void sub(int s[],int y)
{static int t=3; y=s[t];t--;} 
int main()
{ 
int a[]={1,2,3,4};
int i=0,x=0;
for(i=0;i<4;i++)
{sub(a,x);printf("%d",x);
} 
printf("\n");
}


Output:
1
2
3
0000

Exited: ExitFailure 10


Create a new paste based on this one


Comments: