I am trying to store as user input a large number in C in the variable "num" using this piece of code.
scanf("%e",&num); //input: 340282346638528859811704183484516925440
printf("%1.20e\n", num); // output: 3.40282346638528860000e+038
On most implementations,
double has 53 bits of precision. That's about 17 decimal digits, which is what you seem to have.
You can use
long double if available; on Intel platforms, that will give you another 11 bits of precision.
Beyond that, you'll need to find a multiprecision library.