How to deal with very large integers? [closed] - c

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
If I have to store and do an operation on integers in the wide range of [1, 10^50000]. How can I do them? How can I store such large integers values first of all? And, how can I perform basic operations on them subsequently?

There are specialized libraries for arbitrary precision that will help you with this. One I had success with is GMP.

Related

C function: multiply 2 numbers using bit twiddling? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need some help answering the above question Any twiddling idea?
You'll get a lot more here: Bit Twiddling Hacks
Treat one of the inputs as a bitmask. For each bit in it that is set, you want to add the other input, shifted that many spaces left, to your result. This assumes unsigned inputs: non-2's-complement signed inputs require special treatment of the sign bit.
I think I can safely predict that this will be less efficient than the CPU's built-in multiply operation.

how to split a decimal integer into ascii values? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a 4 digit decimal number say 1234. I want to split this number into 4 separate ASCII values like '1','2','3','4'.
The process should not include division operation or integer to string conversion etc.
You want to extract each digit of the number and add '0'. If this is against your requirements, feel free to ignore.
you can anytime change division operator subtraction anytime.

Bubblesort does not sort more than 254859 elements - Why? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Just the question! Why can it not sort more than 254859 elements?
It can, but:
It takes forever
You need to use data types that can hold enough elements.
Other than that, there is absolutely no reason why the algorithm itself would be limited to any particular input size.

Where the offset in a file is stored in C? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
In which place C saves file's offset?
When using standard C I/O, a FILE pointer contains most of the information needed to deal with the file, including its "position indicator." As you read or write through the file, its position (seek) indicator gets updated. See the definition of the FILE type.

Why is C function so long? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I'm coming from a script guy, used to functions within 50 lines.
And when I see frequently functions over 200 lines,I'm really having a hard time reading it.
Is this normal at all?
There is nothing in the language that makes functions "long" - you can write long functions in any reasonable language, and, ideally, should refactor them into smaller, more understandable and maintainable functions in most languages.

Resources