1.

What will be the radix value if the string begins with 0x?(a) 13(b) 14(c) 15(d) 16This question was addressed to me during a job interview.The origin of the question is Parsing Values using JavaScript in chapter Parsing, Benchmarking and Logging of JavaScript

Answer»

The correct CHOICE is (d) 16

To explain I would SAY: If the STRING begins with 0x, then the radix value will be 16. If the string begins with “0”, the radix is 8 (octal). If the string begins with any other value, the radix is 10 (decimal).



Discussion

No Comment Found

Related InterviewSolutions