Wie groß ist die Float-Variable?
Wie groß ist die Float-Variable?

Video: Wie groß ist die Float-Variable?

Video: Wie groß ist die Float-Variable?
Video: C++ Variablen Datentypen double und float 2024, Kann
Anonim

Die Größe von float (Float-Datentyp mit einfacher Genauigkeit) ist 4 Bytes . Und die Größe von double (float-Datentyp mit doppelter Genauigkeit) ist 8 Byte.

Wie groß ist hiervon ein Float-Datentyp?

Gleitkommatypen

Typ Speichergröße Wertebereich
schweben 4 Byte 1,2E-38 bis 3,4E+38
doppelt 8 Byte 2,3E-308 bis 1,7E+308
langes Doppel 10 Byte 3.4E-4932 bis 1.1E+4932

Man kann sich auch fragen, wie groß die kurze Variable ist. 2 Byte

Ebenso fragen die Leute, was die maximale Größe der Float-Variablen sein wird.

Größe der Schwimmer

Primitive Gleitkomma-Datentypen
Typ Größe Bereich
schweben 32 Bit -3,4E+38 bis +3,4E+38
doppelt 64 Bit -1,7E+308 bis +1,7E+308

Wie groß ist ein 64-Bit-Float?

Datentypen und -größen

Modellname 32-Bit-Größe 64-Bit-Größe
schweben 4 Bytes 4 Bytes
doppelt 8 Byte 8 Byte
langes Doppel 16 Byte 16 Byte

Empfohlen: