tag:blogger.com,1999:blog-7092135066960371093.post6408629789506468133..comments2024-01-07T18:31:51.524-08:00Comments on C Tutor... C Tutorial....: Program to print binary equivalent of a decimal number Note MSP should print first and LSB last.Pop's Worldhttp://www.blogger.com/profile/04964875113190825498noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-7092135066960371093.post-58605468742490397802011-11-08T07:07:42.450-08:002011-11-08T07:07:42.450-08:00#include
main()
{
unsigned int num;
int i;
scanf(...#include<br /><br />main()<br />{<br />unsigned int num;<br />int i;<br />scanf("%u",&num);<br />for(i=0;i<32;i++)<br />printf("%d",(num<<i & 1<<31)?1:0);<br /><br /><br />}neerajhttps://www.blogger.com/profile/10623624810253220642noreply@blogger.comtag:blogger.com,1999:blog-7092135066960371093.post-16864225367351127472010-08-05T09:40:12.506-07:002010-08-05T09:40:12.506-07:00dec2bin(int n)
{
if(n == 0)
return ; else
{
dec2bi...dec2bin(int n)<br />{<br />if(n == 0)<br />return ; else<br />{<br />dec2bin (n/2);<br />printf("%d", n%2);<br />}<br />}<br /><br />i think now its rightAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7092135066960371093.post-9211821762075389552010-01-31T22:56:20.865-08:002010-01-31T22:56:20.865-08:00yes sure frind please mail me details to hellopank...yes sure frind please mail me details to hellopankajin@rediff.com i will mail u solution...Pop's Worldhttps://www.blogger.com/profile/04964875113190825498noreply@blogger.comtag:blogger.com,1999:blog-7092135066960371093.post-69807909340225642412010-01-31T17:19:12.126-08:002010-01-31T17:19:12.126-08:00make a sample that will input an integer and displ...make a sample that will input an integer and displays the binary equivalent ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7092135066960371093.post-28912022544729341142010-01-24T16:37:42.518-08:002010-01-24T16:37:42.518-08:00...can you make a sample program that will input a......can you make a sample program that will input an integer and displays the binary equivalent?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7092135066960371093.post-22965001951507937812010-01-24T16:35:37.530-08:002010-01-24T16:35:37.530-08:00..it will not work....it will not work..Anonymousnoreply@blogger.com