Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
2 answers
121 views

Convert number to X base

As an educational exercise, I would like to make this code more efficient, with fewer lines, without using other standard functions. The goal here is to convert a number to X base and display it, (...
ken's user avatar
  • 97
8 votes
3 answers
8k views

Convert binary string to decimal number

I'm finishing the book C Primer Plus by Stephen Prata and I wrote as a part of the homework program to convert binary string to decimal number: ...
user avatar
3 votes
1 answer
448 views

itoa with "method of complements" for negative numbers in ANSI C

I have enhanced my itoa implementation, taking the advise from my previous simple itoa implementation in addition to handling multiple radixes and negative numbers other then just base 10. Looking for ...
Matthew Hoggan's user avatar