I want to assign a value of 097
to an integer variable. I don't want it to get implicitly converted to 97
. Is this possible?
int i=097;
cout<<i;
OUTPUT
as 097
: Possible?
I need to put the value in the link list in reverse order. So if the user is inputting 097
I need to parse it digit wise and store in link list as 7->9->0
. Its not the exact program but its something I am trying to achieve. There can be other ways like using arrays and all. But I was just wondering if I can parse 0
via using int
variable.
No, this is not possible.
Integers are stored in binary, not as individual digits. Therefore, all information not related to the value of the integer is not stored.
Perhaps you would like to store your value in a string instead?
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments