Computer Science, asked by rathnaiah1969, 4 days ago

Double vs float in C​

Answers

Answered by kritaaak
0

Answer:

double displays ans in fractional format so does float (they are same displaying fractional ans)

Answered by navyasree444
0

"float" and "double" are the data types in C used to store real numbers or large numbers with a fractional component.

The main differences between them are:

float:

  • It has a single precision.
  • It takes 4 bytes of memory.
  • It has 32-bit precision.
  • Its value can be between 1.2E-38 to 3.4E+38.
  • It can have a precision of up to 6 decimal places.
  • Syntax : float variable_name = value;

double:

  • It has a double precision.
  • It takes 8 bytes of memory.
  • It has 64-bit precision.
  • Its value can be between 2.3E-308 to 1.7E+308.
  • It can have a precision of up to 15 decimal places.
  • Syntax : double variable_name = value;

Similar questions