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

What is return in c programming?

974


how to make a scientific calculater ?

2076


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

2096


Write a program to swap two numbers without using third variable?

1310


What are valid operations on pointers?

1203


What are structure members?

1094


What are the 4 types of organizational structures?

1109


program to convert a integer to string in c language'

2458


Can stdout be forced to print somewhere other than the screen?

1050


What are the restrictions of a modulus operator?

1129


What is structure in c definition?

1056


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

1245


What is a memory leak? How to avoid it?

1351


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

1396


Can we change the value of static variable in c?

1035