Joel Rodriguez escribió el 2009-11-01:

> mi impresión es que solo puedes almacenar información, minimamente como
> 1 byte (char),. o séa 8-bits, 2 hexadecimales.
>
> lo siguiente sería como almacenar medio byte:
>
>> invalid suffix "b1010" on integer constant

¿Quieres decir que no se pueden usar números menor de 255? ;-) Será su
versión del GCC o un error en el código:

|b...@bli:~$ cat binario.c
|#include <stdio.h>
|
|int main(void)
|{
|   int i = 0b101010;
|
|   printf("%d\n", i);
|
|   return 0;
|}
|
|b...@bli:~$ gcc binario.c -o binario && ./binario
|42
|b...@bli:~$ gcc --version
|gcc (Debian 4.3.2-1.1) 4.3.2
|Copyright (C) 2008 Free Software Foundation, Inc.
|This is free software; see the source for copying conditions.  There is
|NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- 
bli

Responder a