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
Difference between pass by reference and pass by value?
Why string is used in c?
What are the 3 types of structures?
How to write c functions that modify head pointer of a linked list?
Explain how many levels deep can include files be nested?
How can I access an I o board directly?
Explain logical errors? Compare with syntax errors.
What are the types of pointers?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
Can i use “int” data type to store the value 32768? Why?
what are bit fields? What is the use of bit fields in a structure declaration?
Why is it important to memset a variable, immediately after allocating memory to it ?
What are operators in c?
Why doesnt that code work?