intal
Problem Statement
Develop a C library for the integers of arbitrary length (intal).
An intal is a nonnegative integer of arbitrary length, but it is sufficient for your implementation to support up to 1000 decimal digits. The integer is stored as a null-terminated string of ASCII characters. An intal is represented as a string of decimal digits ('0' thru '9') that are stored in the big-endian style. That is, the most significant digit is at the head of the string. An integer 25, for example, is stored in a string s as '2' at s[0], '5' at s[1], and null char at s[2]. intal
Files
- PES1201701122.c is the implementation file, which has the definition of all the functions declared in the header file intal.h.
- You can use the intal_sampletest.c for the sanity check.
- Compile intal_sampletest.c with PES1201701122.c to sanity-check your implementation.
Commands
prompt> ls
op> intal.h intal_sampletest.c PES1201701122.c
prompt> gcc -Wall PES1201701122.c intal_sampletest.c -o mytest.out
prompt> ./mytest.out
Operations
- Addition
- Subtraction
- Multiplication
- Comparing
- Modulus
- Power
- GCD
- Fibonacci
- Factorial
- Binomial Coefficient
Array Operations
- Min
- Max
- Linear Search
- Binary Search
- Sort