Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<ctype.h>
- #include<stdlib.h>
- char data[300];
- char splitdata[];
- struct tuples
- {
- int userID;
- char action;
- char topic[15];
- };
- int main()
- {
- FILE *fpointer;
- fpointer = fopen("inputfile","r+");
- char *dt;
- if(fpointer == NULL)
- {
- printf("Could not open the file");
- return 1;
- }
- struct tuples tuple;
- fgets(data,300,fpointer);
- dt=strtok(&data[1],')');
- printf("%s\n",dt);
- fclose(fpointer);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement