why when I enter zeroes on the left of an integer , c++ borland compiler changes the integer value? -


इस सवाल का पहले से ही एक उत्तर है: < / p>

  • 7 जवाब

    यह कोड, जब मैं चलाऊँगा यह C ++ Borland संकलक 5.02 पर

      # शामिल & lt; iostream.h & gt; शून्य मुख्य () {int x; CIN & gt; & gt; x; Cout & lt; & lt; एक्स; }   

    जब 0010 से x दर्ज करते हैं, तो आउटपुट है 8 ? और ये कुछ प्रविष्टियों के लिए जो इसके शून्य पर शून्य हैं, लेकिन सभी नहीं?

    सी ++ में:

    • अस्थिर संख्या में एक अग्रणी 0 है।
    • हेक्साडेसिमल संख्या में एक अग्रणी 0x है।
    • अन्यथा, आपके पास दशमलव संख्या है।

      इसलिए:

      • 0x10 एक हेक्साडेसिमल नंबर 16 है।
      • 010 8 का प्रतिनिधित्व करने वाला एक ऑक्टल नंबर है।
      • 10 10 अंकों का प्रतिनिधित्व करने वाला दशमलव संख्या है।

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -