main()
{
unsigned int k = 987 , i = 0;
char trans[10];
do {
trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' );
} while(k /= 16);
printf("%s\n", trans);
}
Answer Posted / dishank
deepthisivan can u plz elaborate.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can I read and write comma-delimited text?
What is main () in c language?
Explain what is the general form of a c program?
What is the purpose of clrscr () printf () and getch ()?
What is the difference between malloc() and calloc() function in c language?
Write a program to print factorial of given number using recursion?
What would be an example of a structure analogous to structure c?
Write a program in c to replace any vowel in a string with z?
When do we get logical errors?
What is a null string in c?
Why is c called a structured programming language?
What is #define?
Tell me when would you use a pointer to a function?
swap 2 numbers without using third variable?
What is a macro, and explain how do you use it?