#include <stdio.h>
#include <string.h>

int main(void) {
    char *url = "http://w...content-available-to-author-only...e.com/hello.html";
// find the last index of `/`
char *path = url + strlen(url);
while (path != url && *path != '/') {
   path--;
}
int hostLen = path-url;
char *hostName = malloc(hostLen+1);
memcpy(hostName, url, hostLen);
hostName[hostLen] = '\0';
	printf("%s\n%s\n", path, hostName);
    free(hostName);
	return 0;
}