|
Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
Problem 25 solution implemented using arbitrarily large numbers represented as arrays More...
#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>Macros | |
| #define | MAX_DIGITS 1000 |
| maximum number of digits | |
Functions | |
| unsigned int | add_numbers (unsigned char *a, unsigned char *b, unsigned char *c, int N) |
| Function to add arbitraty length decimal integers stored in an array. More... | |
| int | print_number (unsigned char *number, int N) |
| Print a large number. | |
| unsigned int | get_digits (unsigned char *number) |
| Get number of digits in a large number. | |
| int | main (int argc, char *argv[]) |
| Main function. | |
Problem 25 solution implemented using arbitrarily large numbers represented as arrays
| unsigned int add_numbers | ( | unsigned char * | a, |
| unsigned char * | b, | ||
| unsigned char * | c, | ||
| int | N | ||
| ) |
Function to add arbitraty length decimal integers stored in an array.
a + b = c = new b