I need to take words from a text file and do certain tasks for specific words. But ı can't take word as variables
#include <stdio.h>
#include <stdlib.h>
int main( )
{
char * filename = "file.txt";
FILE * fp = fopen(filename, "r");
if (fp == NULL) return 1;
char c;
int count = 0;
while((c = fgetc(fp)) != EOF)
{
if(c == ' ')
{
printf("\n");
}
else
{
printf("%c", c);
}
}
fclose(fp);
return 0;
} this is what ı used for seperating words but ı can't use words to do something or call a function for example Add name "xxxx" number "xxxxxxxx" when word Add comes it takes name as "xxxx" then number so it creates a virtual file in program with name and add number in it any help ?