Just to give everyone the satisfaction of how bad this code is:
void readticket(FILE* fin, int ticket);
int lottery(int ticket, int winning);
fin = fopen("lottery.txt", "r");
printf("%d ", winning[i]);
scanf("%d \n",readticket); //read ticket
if(lottery==0) //compare ticket, winning using lottery func
printf("Ticket# %d has %d matching numbers \n",&ticket,&winning); //print
void readticket(FILE* fin, int ticket)
int lottery(int ticket, int winning)
As tabstop and my compiler both pointed out, your scanf() is wrong. Always fix syntax errors first so you can test the logic itself instead of wasting time with stupid things like this. This will most likely just waste time crashing your program. If your compiler is not spitting out these types of errors, you need to turn the warning level up higher, preferably to max.
LotteryTicket.c: In function `main':
LotteryTicket.c:23: warning: int format, different type arg (arg 2)
LotteryTicket.c:23: error: syntax error before '/' token
LotteryTicket.c:27: warning: implicit declaration of function `system'
LotteryTicket.c:11: warning: unused variable `ticket'
LotteryTicket.c:12: warning: unused variable `j'
Edit: And actually your entire program logic appears bizarre like you mixed and matched totally different strategies.