Is there any way to store huge numbers (for example, a number with a million digits) in a C program and be able to perform operations on it ?


using std::string and operator overloading, yes it is able

Hi, thanks for your reply..

Can you elaborate the procedure.. It would be very helpful if you could post a link with the mentioned approach...

Thanks :)

There are tons of freeware libraries to perform ops over arbitrary precision numbers in C and C++. Search Google for "C arbitrary precision numbers library". For example:
It's not so easy to invent a new library in this area...

string num1 = "1234";
string num2 = "4567";
string sum = "";
char tmp2 = 0;
1. reverse num1 and num2
2. for 0 to string size() do 
char tmp = num1[i] + num2[i] + tmp2;
tmp2 = 0;
if (tmp > '9'){
  tmp2 = 1;

3. reverse sum and that's it :)