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 4113476
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:19:47+00:00 2026-05-20T22:19:47+00:00

I have an int array that represents a very large number such as: //

  • 0

I have an int array that represents a very large number such as:

// ...
unsigned int n1[200];
// ...

n1 = {1,3,4,6,1,...} ==> means my number is 13461...

How can I convert that large number to its hex value?

  • 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-05-20T22:19:48+00:00Added an answer on May 20, 2026 at 10:19 pm

    So here is my take on the problem:

    1. You have an array of digits.
    2. You want to build an unsigned int from this array of digits.
    3. The array of digits could be either HEX digits, or DECIMAL digits.

    To build this unsigned long long, assuming an array of DECIMAL digits:

    unsigned long long myNum = 0;
    unsigned int n1[200];
    
    for (int i=0; i < n1.length ; i++ ){
        myNum += pow(10,i) * n1[n1.length - i];
    }
    

    To build this unsigned long long, assuming an array of HEX digits:

    for (int i=0; i < n1.length ; i++ ){
        myNum += pow(16,i)* n1[n1.length - i];
    }
    

    (Notice the base 16)

    Disclaimer: limited to exactly 16 digits MAX stored in your array. After that you will overrun the buffer

    If it is just a matter of DISLAYING the number in the correct format…

    Well, an int is an int is an int… (in memory).

    There are 10 fingers on my hands whether or not I call that number 10, or A.

    If you want to format the number for DISPLAY in hex, then try something like:

    unsigned int i = 10;
    //OR
    unsigned int i = 0xA;
    
    printf("My number in hex: %x", i);
    printf("My number in decimal: %d", i);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array in the form of ' int[][] ' that represents the
I have functon that convert list in array: void* list_to_array(SList* list) { int i;
I have a large int[] array and a much smaller int[] array. I want
I have an array of integers: int[] number = new int[] { 2,3,6,7 };
I have an int array that holds a single digit in each index so
I have an int array as a property of a Web User Control. I'd
When you have an array like this: int foo[3][2][2]; and you make: int *bar
Lets say I have this array, int[] numbers = {1, 3, 4, 9, 2};
Let's say I have an int with the value of 1. How can I
I have a database table with a large number of rows and one numeric

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.