Not a decimal number; erroneous octal constant : octal « Data Types « C# / C Sharp






Not a decimal number; erroneous octal constant

 


using System;

public class MainClass{
    public static void Main() {
        int j = 0198;  // Not a decimal number; erroneous octal constant
        Console.WriteLine(j);
    }
}

   
  








Related examples in the same category

1.To specify an octal constant, begin the specification with 0, followed by a sequence of digits in the range 0 through 7.
2.Leading zero specifies octal constant, not decimal