English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i am working in C in linux,gcc compiler i am using.

2007-02-05 17:03:20 · 4 answers · asked by saritha v 1 in Computers & Internet Programming & Design

4 answers

Because those are the default sizes.

2007-02-05 17:08:24 · answer #1 · answered by Anonymous · 0 0

In Turbo C, integers will be given size 2 and floats size will be 4.

But in linux gcc compiler, both of them have size 4 bytes.

2007-02-05 20:41:45 · answer #2 · answered by james wade 1 · 0 0

.

It depends on the type of OS you use and the type of Compiler you use.

In Turbo C, integers will be given size 2 and floats size will be 4.

But in linux gcc compiler, both of them have size 4 bytes.

Its all how the compiler considers the variables to be.

**********
Vasu M
**********

2007-02-05 20:34:15 · answer #3 · answered by V@su Maniram 3 · 0 0

Both are 4-byte values, with different ways of encoding the underlying number. Int's commonly allow +/- 2^31 (roughly +/- 2,000,000,000) and floats allow for roughly 7 places of accuracy.

2007-02-05 17:09:54 · answer #4 · answered by KnightSpot 2 · 0 0

fedest.com, questions and answers