InterviewSolution
Saved Bookmarks
| 1. |
Which of the following format specifiers is used to print hexadecimal values and return value of output as Octal equivalent in C#?(a) %hx for small case letters and %HX for capital letters(b) %x for small case letters and %X for capital letters(c) No ease of doing it. C# don’t provides specifier like %x or %O to be used with ReadLine() OR WriteLine(). We have to write our own function(d) %Ox for small case letters and %OX for capital lettersI have been asked this question during a job interview.Query is from Floating and Decimal Data Types topic in chapter Data Types, Variables and Operators of C# |
|
Answer» Correct answer is (c) No ease of doing it. C# don’t provides specifier LIKE %X or %O to be used with ReadLine() OR WriteLine(). We have to WRITE our own FUNCTION |
|