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 |
Are the outer parentheses in return statements really optional?
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
Can I initialize unions?
What is a ternary operator in c?
What tq means in chat?
In which area global, external variables are stored?
difference of two no's with out using - operator
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
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?
What does double pointer mean in c?