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 / kk

let the number be n
int bin(int n)
{
static int sum=0;

if(n>1)
{
rem=n%2;
sum = sum *10 +rem;
n=n/2;
bin(n);
}
else
{
sum=sum*10+1;
}
return sum;
}

Is This Answer Correct ?    7 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of scanf() and printf() functions?

1172


What is a list in c?

982


while initialization of array why we use a[][2] why not a[2][]...?

2302


What are the header files used in c language?

992


What is the process to create increment and decrement stamen in c?

988


what is event driven software and what is procedural driven software?

2507


What is the significance of an algorithm to C programming?

994


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1017


Is python a c language?

946


The statement, int(*x[]) () what does in indicate?

1080


about c language

1960


Explain what is the difference between functions abs() and fabs()?

1098


Why doesnt this code work?

1005


What is the condition that is applied with ?: Operator?

1069


What is include directive in c?

1087