Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #include<string.h>
- int main (int argc, char argv[]) {
- FILE *file;
- int x, y;
- char s[100];
- char s1[100];
- char *token; //token is a pointer to a char.
- char tokenList[20][100];
- int NumTokens = 0;
- file = fopen("biglist2.txt", "r");
- while (!feof(file)) {
- fgets(s1, 100, file);
- //sscanf(s, "%d %d", &x, &y);
- printf("%s n <br>", s1);
- }
- strcpy( s, s1 );
- token = strtok(s, " ");
- while (token != NULL) {
- token = strtok(NULL," ");
- printf("%s <br>", token);
- }
- fclose (file);
- return 0;
- }
Add Comment
Please, Sign In to add comment