Pergunta de entrevista da empresa Morgan Stanley

how do you write "2008" at the console using any language without any ?number in your code

Respostas da entrevista

Sigiloso

12 de mai. de 2014

We know that C language can work in case of ASCII values so we can use techniques like ASCII values of C-A that will give 2 in numeral,similarly for 0 0 8 also

2

Sigiloso

2 de out. de 2014

Console.WriteLine(('c' - 'a').ToString() + ('a' - 'a').ToString() + ('a' - 'a').ToString() + ('i' - 'a').ToString());

1

Sigiloso

15 de jul. de 2014

var today = new Date(); var year = today.getFullYear(); var days = ['sun','mon','tue','wed','thu','fri']; var len = days.length; console.log(year - len);

1