Prog#194: display the file line by line

/*
display the file line by line
Program#194
*/
#include<stdio.h>
main(int argc,char *argv[])
{
int i;
char a[100];
FILE *fp;
if(argc!=2)
{
printf("error. no.of arg");
return 0;
}
fp=fopen (argv[1], "r");
if(fp==NULL)
{
printf("file open error");
return 0;
}
for(i=0;(a[i]=getc(fp))!=EOF;i++)
{
if(a[i]=='\n')
{
a[i]='\0';
puts(a);
i=-1;
fclose(fp);
}
}
}