problem with assignment

How can I detect a number, whether it is decimal or binary or octal?
I've to create an array; I have to detect its elements as decimal, binary & octal...
Can anybody help?
There is no way to determine whether the record 11 represnts a binary, octal, decimal or hexadecimal number.:)
All integer numbers irrespective of their representations on a paper are stored in the same binary format.:)
Last edited on
But I can consider 0,1 as binaries, 0-9 as decimals and 0-7 as octals...
this wouldnt help?
It helps slightly, but doesn't completely resolve the ambiguity in all cases.
You're left with having to take a guess, or make an assumption about those which would fit into more than one category.

@Sam99
But I can consider 0,1 as binaries, 0-9 as decimals and 0-7 as octals...
this wouldnt help?



Thus you have answered your question yourself.:)
Topic archived. No new replies allowed.