How can I convert integers to binary or hexadecimal?
Answer Posted / sabarish
for decimal to hexa its very simple.
void main()
{
int a=10;
printf("%x",a); // returns the hexa decimal equivalent
}
| Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
How can you find the day of the week given the date?
What are the application of c?
What is the difference between strcpy() and memcpy() function in c programming?
What is scope rule of function in c?
What is the purpose of sprintf?
Explain the difference between strcpy() and memcpy() function?
Can a pointer point to null?
Explain what is meant by 'bit masking'?
What is getch() function?
Explain how are portions of a program disabled in demo versions?
How can I write a function analogous to scanf?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
Write a program to check armstrong number in c?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
What does #pragma once mean?