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

Explain is it better to bitshift a value than to multiply by 2?

1157


I need previous papers of CSC.......plz help out by posting them.......

2262


What is a constant?

1010


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2039


What is string length in c?

1045


How do you determine the length of a string value that was stored in a variable?

1097


program for reversing a selected line word by word when multiple lines are given without using strrev

2440


What are data types in c language?

1026


What are unions in c?

996


What happens if you free a pointer twice?

1038


explain what is fifo?

1033


What is the difference between array and pointer?

979


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

1060


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

1122


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?

1228