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 write a prog in c to convert decimal number into
binary by using recursen function,



how to write a prog in c to convert decimal number into binary by using recursen function,..

Answer / madhavi

void decitobin(int n);

main()
{
int n;
printf("Enter an integer:");
scanf("%d",&n);
decitobin(n);
}

void decitobin(int n)
{
if(n>0)
{
decitobin(n/2);
printf("%d",n%2);
}
}

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Interview Questions

Are the outer parentheses in return statements really optional?

0 Answers  


what is the difference between auto and static keywords

1 Answers   cDot, College School Exams Tests, TCS,


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

0 Answers  


Can I initialize unions?

0 Answers  


What is a ternary operator in c?

0 Answers  


What tq means in chat?

0 Answers  


In which area global, external variables are stored?

3 Answers  


difference of two no's with out using - operator

7 Answers  


When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these

1 Answers   Accenture, IBM,


what is the difference between normal variables and pointer variables..............

15 Answers   HP, Infosys, Satyam, Vivekanand Education Society,


Why should I use standard library functions instead of writing my own?

0 Answers  


What does double pointer mean in c?

0 Answers  


Categories