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 |
What is pointer to pointer in c with example?
Differentiate between Macro and ordinary definition.
what is the difference between malloc() and calloc() function?
struct node {struct node*temp,*new} prinf("%d",sizeof(struct node));
in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?
What are the 32 keywords in c?
how to find out the inorder successor of a node in a tree??
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
int main() { int days; printf("enter days you are late"); scanf("%d",days); if (days<=5) printf("5o paisa fine"); if (days<=10&&days>=6) printf("1rs fine"); if(days>10) printf("10 rs fine"); if(days=30) printf("membership cancelled"); return 0; } tell me whats wrong in this program? is it right?
code for concatination of 2 strings with out using library functions?
Do you know what are bitwise shift operators in c programming?
When we use void main and int main?