Pregunta de entrevista de Microsoft

Implement the toLowerCase() method

Respuestas de entrevistas

Anónimo

2 oct 2017

String str = "GLASS DOOR"; char [] arr = str.toCharArray(); for(int i = 0 ; i =65){ val = val + 32; } arr[i] = (char) val; } System.out.println(String.valueOf(arr));

Anónimo

2 oct 2017

String str = "GLASS DOOR"; char [] arr = str.toCharArray(); for(int i = 0 ; i =65){ val = val + 32; } arr[i] = (char) val; } System.out.println(String.valueOf(arr));

Anónimo

2 oct 2017

The 3rd line iterates from - for ( i = 0 to str length ) Glassdoor is converting the for statement to a garbage value for some reason

Anónimo

22 ene 2018

def toLower(sentence): newsent="" for i in sentence: newsent+=chr(ord(i)+32) return newsent

Anónimo

20 ago 2019

#include using namespace std; int main() { string a = "ABCD EFGH"; for(int i = 0; i = 'A' && a[i] <= 'Z') { a[i] += 32; } } cout << a; return 0; }

Anónimo

20 ago 2019

#include using namespace std; int main() { string a = "ABCD EFGH"; for(int i = 0; i = 'A' && a[i] <= 'Z') { a[i] += 32; } } cout << a; return 0; } //the if statement does show right on Glassdoor. it is and and operator, it is not && Also it is less than or equal to A not equal only