You can use strtok() to parse the input. The below demonstrates (how you read from file is outside the scope of this)
// what you have read from file
char data = "192.168.13.33";
// ip address
int index = 0;
/* get the first token */
token = strtok(data, ".");
/* walk through other tokens */
while ( token != NULL && index < sizeof(ip))
ip[index++] = atoi(token);
token = strtok(NULL, ".");
for (int cnt = 0; cnt < sizeof(ip); cnt++)
Instead of printing, you can use the 4 elements of the ip array in other ways where you need them.
Note that strtok is destructive, so the data variable no longer ‘contains’ the original ip address as text.