Cover image for SpaceX
Logo

SpaceX

Empresa activa

SpaceX

Añadir una entrevista

Pregunta de entrevista

Entrevista de Computer Engineer

-

SpaceX

"What is the size of an integer on a 32-bit system?"

Respuestas de entrevistas

8 respuestas

6

2^32= 4 billionish ?

Anónimo en

3

4 byte

Anónimo en

2

4 bytes

Anónimo en

5

Reading these answers now I understand why would ask the question. According to C/C++ standards the size of an integer, regardless of any hardware limitations, is at least 16 bits; but usually the size of an integer is 32 bits. It has nothing to do with it being signed or unsigned (question asks about size, not range).

Ali en

7

Depends if it's signed or unsigned...

Anónimo en

1

Depends on the CPU and compiler. It is really arbritary how a regular integer is defined, though you must know what they chose. In Microsoft .net, a regular integer is 32-bit. In their prior Visual Studio 6, it was 16-bit. In TI Code Composer (for TI DSP chips), even a Boolean (true/false) occupied 32-bits of memory.

Anónimo en

0

Found excellent read: bit.ly/faang100

Anónimo en

7

Four? A byte is 8-bits. 8/32 = 4

Andrew Gardiner en

Añadir respuestas o comentarios

Para publicar un comentario sobre esto, inicia sesión o regístrate.