Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8582829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:23:35+00:00 2026-06-11T21:23:35+00:00

I am writing a program that gets From IP address and To IP address

  • 0

I am writing a program that gets From IP address and To IP address from the user and displays the list of IP addresses between them. For example, if the user gives 10.0.0.1 and 10.0.0.5 then I will display the five IP addresses between these two. The current solution that is coming in my mind are:

  1. To have a list of all IP addresses and then look for the resultant IP address list
  2. Use a nested loop

What solution should I adopt between these (or suggest a better solution)? For the first solution, what is the link for IP address table/list?

What is the solution in terms of JavaScript or Java?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:23:37+00:00Added an answer on June 11, 2026 at 9:23 pm

    First split the IP addresses with .. From the first IP address, start increasing the fourth part up to 255 and then add 1 to the third part and set the fourth one to 1. Until you reach the to IP address.

    • IP address bytes -> bits -> Int32
    • From: 10.0.10.10 -> 00001010 00000000 00001010 00001010 -> 167774730
    • To: 10.1.45.1 -> 00001010 00000001 00101101 00000001 -> 167849217
    • Start count from From to To and just check the unwanted bytes which is 11111111 and 00000000.

    That’s all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a program that lets the user input 6 temperature readings, and then
I'm writing a python3 program, that gets the names of files to process from
I am writing a small program that gets activated when sms is received.We need
I am writing a program that permutes a list of names based on a
I am writing a program that downloads images to the hard drive and then
I am using libcurl for a small program that gets data from an input
I'm currently writing an iPhone application which gets some data from the user and
I am writing a java program that gets the rainfall for each month. It's
I'm writing a function that takes a string of input from the user until
I am writing a very simple program that removes duplicate chars from a string.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.