IP addresses and IP numbers An IP address (IPV4) consists of integers w, x, y, and z and is typically written as the string w.x.y.z. The corresponding IP number is given by 16777216w + 65536x + 256y + z. Given an IP number n, the corresponding IP address is derived from w = (n / 16777216) mod 256, x = (n / 65536) mod 256, y = (n / 256) mod 256, z = n mod 256. Write a function that takes an IP number and returns a String representation of the IP address. and another function that takes an IP address and returns a int corresponding to the IP number. For example, given 3401190660, the first function should return 202.186.13.4.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here