Given an IP Address and task is to change the IP address equivalent the hexadecimal value.
Input : 127.0.0.1 Output : 0x7f000001 Input : 172.31.0.2 Output : 0xac1f0002
using the Library function to convert the IP address to convert into the hexadecimal value we use ” arpa/inet.h “ header file. The inet_addr() function shall convert the string in the standard IPv4 dotted decimal notation, to an integer value suitable for use as an Internet address.
- Convert IP address to integer and vice versa
- StringStream in C++ for Decimal to Hexadecimal and back
- Count Hexadecimal Number
- Python program to find IP Address
- Java Program to Determine Hostname from IP Address
- Address Resolution in DNS (Domain Name Server)
- Three address code in Compiler
- Logical and Physical Address in Operating System
- Concept Of Address Split in OS
- How to validate an IP address using Regular Expressions in Java
- Determining the IP Address & Hostname of Local Computer in Java
- Python program to convert time from 12 hour to 24 hour format
- Program to Convert List to Map in Java
- Program to convert Byte Array to Writer in Java
- Program to Convert a Vector to List in Java
- Program to convert the diagonal elements of the matrix to 0
- C++ program to Convert a Matrix to Sparse Matrix
- C++ Program to Convert String to Integer
- Java Program to Convert English Text to Morse Code and Vice-Versa
- Java Program to Convert Binary Code Into Equivalent Gray Code Using Recursion
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.