Back to Problem list
Back to Problem list
Problem 11: Write a program which takes an integer and print equivalent hex.
Solution: We have to only print the hex. So we do not need to convert dec. to hex.
int n;
scanf("%d",&n);
printf("%x\n",n);
Done !!!
printf("%x",a_dec); .... this function will print hex. for a decimal number a_dec;
Back to Problem list