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.

151 questions
0
votes
2 answers

Dynamic Programming Issue - Fibonacci Sequence

I was reading this Wikipedia article, and attempting to implement a 'map' based solution in C, where a 'map' is just an int array, initialized to 0. For some reason it works up to fib(93), then starts outputting strange numbers. If it matter's I'm…
Josh
  • 11,980
  • 9
  • 70
  • 116
-1
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[] =…
-1
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…
-1
votes
1 answer

How to convert unsigned long long to float/int in C?

An unsigned long long variable has the value of "40 36 70 A3 D7 0A 3D 71" in hex. If I print it with the %fconversion specifier I get the right conversion from IEEE-754. How can I cast this variable to a floating one or int, even if I lose some…
-1
votes
1 answer

Maximum Value for Unsigned Int is it -1

I was trying to figure out the minimum and maximum value for an unsigned data type. I know that the minimum unsigned value is 0 and the maximum value is (2^n)-1. However, when I tried to run my program (I cannot post my code, but you can refer to…
eLg
  • 479
  • 3
  • 11
  • 24
-1
votes
1 answer

The mod function isn't working properly for me

When I input 36011 it results in the second(s) output being 36011 instead of 11, I made sure the compiler settings were set correctly and everything. I genuinely don't know what else to do, I have to use long long int for this assignment and it's…
Ethan
  • 1
-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
  • 177
  • 14
-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
  • 136
  • 2
  • 13
-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
  • 13
  • 4
-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

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
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…
-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…
1 2 3
10
11