Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find the binary of a number?

Answer Posted / naresh m

main()
{
int a[12],n,m,i=0;
printf("enter the no to find binary no's");
scanf("%d",&n);
while(n!=0)
{
m=i++;
a[i]=n%2;
n=n/2;
}
printf("binary value is");
for(i=m;i>=0;i--)
{
printf("%d",a[i]);
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

1338


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3444


Explain zero based addressing.

1099


What is the use of extern in c?

1153


What is the difference between void main and main in c?

1215


How can I delete a file?

1125


please explain every phase in the "SDLC" in the dotnet.

2676


How can I find the modification date of a file?

1341


Explain output of printf("Hello World"-'A'+'B'); ?

1562


What is page thrashing?

1148


What is the difference between #include

and #include “header file”?

1093


What are the applications of c language?

1127


What are global variables and explain how do you declare them?

1187


c program to compute AREA under integral

2470


What is FIFO?

1843