Can someone tell me what value would each of the line of code will have, when you go through this code:
Here is the full code:
server.conf:
interface=192.168.0.2;
log=/var/log/example;
example.c:
conf_fd=open("/etc/example/server.conf",O_RDONLY);
read(conf_fd,conf,100);
close(conf_fd);
/* Get server IP */
buffer=strtok(conf,";");
buffer1=strtok(NULL,";");
strtok(buffer,"=");
server=strtok(NULL,"=");
server_ip=inet_addr(server);
What is the value at these lines?
strtok(buffer,"=");
server=strtok(NULL,"=");
server_ip=inet_addr(server);