#include<stdio.h>
#include<string.h>

void read_line(char *file_name,int line, char *output);

main ()
{
char tulostus[1024];
read_line("ss/lefty.u3s",6,tulostus);
printf("Siell„ oli:%s \n",tulostus);
return (0);
}

void read_line(char *file_name,int line, char *output)
{
FILE *f;
char buf[1024];
int num=0;
f=fopen(file_name,"r");
while((fgets(buf,1024,f))!=0)
	{
	if(num==line)
		{
                buf[strlen(buf)-1]=0;
                strcpy(output,buf);
                //memcpy(output,buf,strlen(buf)-1);
		break;
		}
	num++;
	}
fclose(f);
free(buf);
}

