Good day, tell me how to set up the compiler or change the code so that it outputs a large number (with great precision) with a floating point without removing the numbers?

Here is the actual code:

#include <stdio.h> char string[] = "FuckYeah"; int main() { printf("%f\n", *(double*)string); } 

As practice has shown, the code launched from under different compilers displays the number of different lengths. For example, in order to make an attempt on a real-off basis of a real-off- on-one-off-one-on-one-the-a- 634941928355238664703301556538757088234490620633221521060631490352699066770913322172609098633882733972770441183071593866097446888694984996051123410270173974499242719895307423437791973739342069760.000000 off- 634941928355238664703301556538757088234490620633221521060631490352699066770913322172609098633882733972770441183071593866097446888694984996051123410270173974499242719895307423437791973739342069760.000000 : 634941928355238664703301556538757088234490620633221521060631490352699066770913322172609098633882733972770441183071593866097446888694984996051123410270173974499242719895307423437791973739342069760.000000

On my home computer, the compilers displays the same number, but already cutting it in an exponential form: 6.349419283552386647000000000000000000000e+194

  • tried to display "%.20f" ? - pavel
  • What can you talk about with such a call? Convert pointer to string to pointer to double , dereference, output as float ... - Harry
  • @pavel yes, I tried everything and "%.20f" also PS compiler: Borland C ++ Compiler version 5.5 is free or Dev-C ++. The 634941928355238660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00000000000000000000 is a little bit different in a bit more
  • By the way, garbage - no double such accuracy will not pull. - Harry
  • one

0