Re: [LIP] How to represent a number as binary in C
"Kapil Sethi" <mailkapil-cVJ5NjMFGLEMRHSAxyZ1NwC/[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
is the code snippet ok?
printf("%d\n",0b101);
The expected output according to your suggestion should be 5.
But this does not compile.
Please help
Thanks
Kapil Sethi
----- Original Message -----
From: <[email protected]>
To: <linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Sent: Friday, December 26, 2003 13:33 PM
Subject: Re: [LIP] How to represent a number as binary in C
>
>
>
>
>
>
> 0b
>
>
>
>
>
>
> "Kapil Sethi" <mailkapil-cVJ5NjMFGLEMRHSAxyZ1NwC/[email protected]>@lists.sourceforge.net on
> 12/26/2003 01:10:07 PM
>
> Please respond to linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>
> Sent by: linux-india-programmers-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>
>
> To: <linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> cc:
>
> Subject: [LIP] How to represent a number as binary in C
>
>
> Hi,
>
> We all know that to represent a number in hexadecimal we prefic the number
> with a 0x
> eg. 0x100 is hexadecimal.
>
> 1. What suffix/prefix is used if we want to represent a binary number?
>
> 2. What suffix/prefix is used if we want to represent a binary number?
>
> Thanks
> Kapil Sethi
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
> Free Linux Tutorials. Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> linux-india-programmers mailing list
> linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/linux-india-programmers
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
> Free Linux Tutorials. Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> linux-india-programmers mailing list
> linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/linux-india-programmers
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click