how can i perform multipication of two very large numbers(example 10^18 * 10^18) and store them in C language.?
You can do it in the manner you would do by hand - multiplying, carrying, etc using an array of integers, and then store it in a 2d array, or as a string. Some other fast multiplication algorithms are -
Toom–Cook, sometimes known as Toom-3, named after Andrei Toom, who introduced the new algorithm with its low complexity, and Stephen Cook, who cleaned the description of it, is a multiplication algorithm for large integers.
Given two large integers, a and b, Toom–Cook splits up a and b into k smaller parts each of length l, and performs operations on the parts. As k grows, one may combine many of the multiplication sub-operations, thus reducing the overall complexity of the algorithm. The multip...
(Fast Fourier Transform based multiplication) http://numbers.computation.free.fr/Constants/Algorithms/fft.html
Hope this Helps!
karatsuba will be helpful… thanks @ priyanshu_95