You need to add a lib to work with very large numbers, on Ubuntu I suggest the GMP. Install GMP with apt-get install libgmp-dev.
An example of summation using libgmp:
#include <stdio.h>
#include <gmp.h>
// Compile com:
// gcc -lgmp -lm -o add_ex add_ex.c
int main()
{
mpz_t a, b, soma;
mpz_init_set_str(a, "35398664372827112653829987240784473053190104293586", 10);
mpz_init_set_str(b, "17423706905851860660448207621209813287860733969412", 10);
mpz_add (soma, a, b);
mpz_out_str(stdout, 10, a);
printf("\n + \n");
mpz_out_str(stdout, 10,b);
printf("\n = \n");
mpz_out_str(stdout, 10, soma);
printf("\n");
return 0;
}
The output:
35398664372827112653829987240784473053190104293586
+
17423706905851860660448207621209813287860733969412
=
52822371278678973314278194861994286341050838262998