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


Please Help Members By Posting Answers For Below Questions

Difference between pass by reference and pass by value?

656


Why string is used in c?

580


What are the 3 types of structures?

568


How to write c functions that modify head pointer of a linked list?

539


Explain how many levels deep can include files be nested?

622






How can I access an I o board directly?

620


Explain logical errors? Compare with syntax errors.

618


What are the types of pointers?

596


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

630


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

632


Can i use “int” data type to store the value 32768? Why?

754


what are bit fields? What is the use of bit fields in a structure declaration?

1497


Why is it important to memset a variable, immediately after allocating memory to it ?

1550


What are operators in c?

575


Why doesnt that code work?

597