Discussion: Type conversion
Afficher un message
Vieux 31/01/2008, 09h15   #1
manik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Type conversion

Assuming int is 32 bits and char is 8 bits on my machine

Say I have the following piece of code

int a = 0x12345678;
char b;

b=(char)a;

What would be the value of b?

Would the value of b depend on the endianness of the machine?
  Réponse avec citation
 
Page generated in 0,04109 seconds with 9 queries