Answer Posted / kamalb008
#include<stdio.h>
main()
{
int a,i,b,n;/*i have taken arbitary base u can enter the
base what ever u need*/
printf("enter the number and the base u want to conv resp");
scanf("%d%d",&a,&n);
i=1;
while(i<=20)
{
if(a<n)
break;
b=a%n;
a=a/n;
printf("\nLSB%d of the converted number is %d",i,b);
i++;
}
printf("\nMSB of the conv is %d",a);
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How will you write a code for accessing the length of an array without assigning it to another variable?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
How can I manipulate individual bits?
Explain the use of keyword 'register' with respect to variables.
I need a sort of an approximate strcmp routine?
How can I do serial ("comm") port I/O?
How do you use a pointer to a function?
What do you mean by scope of a variable in c?
Write program to remove duplicate in an array?
What is stack in c?
What is clrscr in c?
What are the types of unary operators?
When is a void pointer used?
What does s c mean in text?
Explain what is page thrashing?