#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<process.h>
#include<ctype.h>
int main()
{
FILE*f;
charname[50],*pch,*pch1;
charch[100];
f=fopen("sample.txt","r");
if(f==NULL)
{
printf("
File Not Found ");
getch();
exit(0);
}
while(fgets(ch,sizeof(ch),f))
{
pch=strtok(ch,",.-");
while(pch!=NULL)
{
printf("%s
",pch);
pch=strtok(NULL,",.-");
}
}
getch();
return0;
}
Comments
Leave a comment