Questions tagged [unsigned-long-long-int]

unsigned long long int specified in the C99 standard

unsigned long long long int is at least 64-bit in size and was specified in the C99 standard. It is the same as long long but unsigned.

162 questions
-1
votes
3 answers

Decimal to Hex conversion (C) is not working for large numbers

I'm making a C program to convert a decimal into a hexadecimal. My program seems to work fine for smaller numbers like 314156 stored in a long int but larger numbers such as 11806310474565 or 8526495043095935640 always return back 0x7FFFFFFF. How…
below_avg_st
  • 187
  • 15
-1
votes
2 answers

Can i use unsigned long long arrays

I was trying to solve this problem on hackerrank. You are given four integers: N,S,P,Q. You will use them in order to create the sequence with the following pseudo-code. a[0] = S (modulo 2^31) for i = 1 to N-1 a[i] = a[i-1]*P+Q (modulo 2^31)…
manji369
  • 186
  • 4
  • 16
-1
votes
1 answer

Encrypt/Compress a 17 digit number to a smalller 9(or less) digit number

I have a unsigned long integer(8 bytes) which is guaranteed to be of 17 digits and i want it to store in int(4 bytes) which is of 9 digits at max. Basically i want to encrypt or compress the number so that i could retrieve the number without any…
boxer_1
  • 25
  • 8
-1
votes
1 answer

Project Euler 3 in c,code processing for too long for large numbers?

It is taking forever to give the answer,it seems like it is just processing the answer? I have seen similar questions but please tell me what is wrong with this code? #include main() { int flag=0; unsigned long long int j,z,ino,i; …
-2
votes
1 answer

How to convert unsigned long long int into unsigned char*?

Say for instance I have this unsigned long long int: unsigned long long int test_int = 0xcfffedefcfffeded; // 14987959699154922989 How could I convert test_int into the following unsigned char* array: unsigned char test_char[] =…
-2
votes
1 answer

C++ count digit of factorial of a large digit, two digit number or more

Click Here to View CodeFunction to perform factorial of digit and count the number of digit of that factorial When i give "Input:13" this code give the desired output but when i use a "Input: digit greater the this or 3 digit number" then it is…
-2
votes
1 answer

Addition between int datatypes and custom class datatypes in c++ to get higher performance

I produced my own class long_number to proceed mathematical operations for higher numbers than long long int (for prime numbers purpose, etc. ). Now I am testing the addition and comparing the speed on the following code: #include…
-2
votes
2 answers

Array of 20000000 elements limits

For a university project, I have to sort a CSV file of 20 million records (wich are represented in 2^64 bit, for example, 10000000 or 7000000, so I used unsigned long long) using MergeSort. So, I developed this C file: #include #include…
Lorenzo
  • 85
  • 1
  • 9
-2
votes
1 answer

Project Euler task #8, code starts returning wrong answers after certain point

I am having some sort of a problem in a task from https://projecteuler.net/problem=8, (finding highest product of 13 consecutive numbers from a 1000-number string) where up to some point the program gives me predictable results and then the…
-3
votes
2 answers

how to use long long keyword in Turbo C++ 3.2 compiler

I am doing some emnedded work for which I am writing program in CPP. My machine has dos platform. In my program I am using long long keyword which is not working.I am using turboC++ 3.2 compiler. I have searched a lot and find C99 library has…
-5
votes
2 answers

what is the type of unsigned integers in c?

uint8 can be represented as ubyte, uint16 can be represented as is uword, uint32 can be represented as ulong, uint64 can be represented as ? I am searching regarding how the unsigned integers can be represented as data type in c but I got confusion…
-6
votes
3 answers

Unsigned int64 C++ to Java

Can the following snippet be successfully converted to Java? u64 magic_table[5] = { 0x1000000010000000ull, 0x1000000000010000ull, 0x1000000000000001ull, 0x0100000001000000ull, 0x0000000100000001ull }; u64 test(u64 magic_sum, int index) { …
Ivan-Mark Debono
  • 15,500
  • 29
  • 132
  • 263
1 2 3
10
11