Is it possible to Store 0 as the first digit in integer variable

Unbreakable

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.

Dave Van den Eynde

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Is it possible to Store 0 as the first digit in integer variable

From Dev

how is it possible to store an integer in a character variable?

From Dev

How to store 10^6 digit in an integer?

From Dev

is storing each digit of an integer into a char array possible?

From Dev

how to swap the first digit(if not largest among the digits) with largest digit in an integer

From Dev

How do I get the id of parent div, then take out the first 3 letters of the name and store the last digit of the name into a variable?

From Dev

vba store recordset as integer variable

From Dev

How could an integer variable store a reference to integer?

From Java

Scramble each digit of the int a and print out the biggest possible integer

From Dev

Is it possible to convert a digit integer in python into a 1 byte character

From Dev

Only the first digit of my integer value is displayed in Php

From Dev

How do I test if the first digit of an integer is a 7?

From Dev

Is it possible to store the results of a mixin in a variable?

From Dev

How to store integer in fewest bits possible in Java

From Dev

round number to the first 3 digits (start with digit != 0)

From Dev

Input box - Prevent user from entering 0 as first digit

From Dev

Phone Number Validation. Allow only 0 as first digit

From Dev

How To Validate Text Field not accept 0 as First digit and Whole digit using Javascript

From Dev

Program that displays each digit on an integer in english doesn't work with an integer beginning with "0"

From Dev

In bash, is it possible to use an integer variable in a brace expansion

From Dev

Is it possible to store variadic arguments into a member variable?

From Dev

Why is it possible to store a function of the prototype inside a variable?

From Dev

Is it possible to store a deferred command execution in a bash variable?

From Dev

Is it possible to store a prompt's message into a variable?

From Dev

Is it possible to store body of class method in a variable?

From Dev

Is it possible with LESS CSS to store multiple arguments in a variable?

From Dev

Is it possible to store a deferred command execution in a bash variable?

From Dev

Is it possible to store a prompt's message into a variable?

From Dev

Find target digit of an integer

Related Related

  1. 1

    Is it possible to Store 0 as the first digit in integer variable

  2. 2

    how is it possible to store an integer in a character variable?

  3. 3

    How to store 10^6 digit in an integer?

  4. 4

    is storing each digit of an integer into a char array possible?

  5. 5

    how to swap the first digit(if not largest among the digits) with largest digit in an integer

  6. 6

    How do I get the id of parent div, then take out the first 3 letters of the name and store the last digit of the name into a variable?

  7. 7

    vba store recordset as integer variable

  8. 8

    How could an integer variable store a reference to integer?

  9. 9

    Scramble each digit of the int a and print out the biggest possible integer

  10. 10

    Is it possible to convert a digit integer in python into a 1 byte character

  11. 11

    Only the first digit of my integer value is displayed in Php

  12. 12

    How do I test if the first digit of an integer is a 7?

  13. 13

    Is it possible to store the results of a mixin in a variable?

  14. 14

    How to store integer in fewest bits possible in Java

  15. 15

    round number to the first 3 digits (start with digit != 0)

  16. 16

    Input box - Prevent user from entering 0 as first digit

  17. 17

    Phone Number Validation. Allow only 0 as first digit

  18. 18

    How To Validate Text Field not accept 0 as First digit and Whole digit using Javascript

  19. 19

    Program that displays each digit on an integer in english doesn't work with an integer beginning with "0"

  20. 20

    In bash, is it possible to use an integer variable in a brace expansion

  21. 21

    Is it possible to store variadic arguments into a member variable?

  22. 22

    Why is it possible to store a function of the prototype inside a variable?

  23. 23

    Is it possible to store a deferred command execution in a bash variable?

  24. 24

    Is it possible to store a prompt's message into a variable?

  25. 25

    Is it possible to store body of class method in a variable?

  26. 26

    Is it possible with LESS CSS to store multiple arguments in a variable?

  27. 27

    Is it possible to store a deferred command execution in a bash variable?

  28. 28

    Is it possible to store a prompt's message into a variable?

  29. 29

    Find target digit of an integer

HotTag

Archive