WebMay 4, 2010 · String str = "The Sun rises in the east and sets in the west."; System.out.println("indexOf (c) : " + str.indexOf('c')); The output for the above code : indexOf (c) -- -1 If the passed argument character is not found in the string indexOf method returns -1. Try this code String str = "The Sun rises in the east and sets in the west."; WebOct 14, 2024 · Input string :- “4PREP2INSTAA6”. Output :- 12. As in the given string “4PREP2INSTAA6” the number of character that is a number is 4+2+6=12 hence the output is 12. First we can iterate through the string and check if the character is in range of ‘0’ to ‘9’ if that is the case we will add it to the sum and then print the result.
10 Wipro Coding Questions That You’ll Be Definitely Asked
WebDec 19, 2024 · 13K views 2 years ago Wipro Coding Questions. String permutation question asked in previous year Wipro NLTH Papers. We solve it efficiently using … WebSep 27, 2024 · Code written while solving exercises and challenges on Codility. Codility is a technical recruitment platform for teams to test the coding skills of developers. codility codility-lessons codility-solutions codility-training codility-exercises codility-lessons-exercises codility-challenges. Updated on Jun 30, 2024. how many short stories did etgar keret wrote
Wipro Coding Questions With Answers 2024 [Updated]
WebAug 31, 2024 · Finding String Code Logic Building Problems Placement Questions Java Code - YouTube Logic Building Videos:Message Controlled Robot Movement... WebNov 11, 2024 · Given string S of size N, the task is to find the single-digit sum by the repetitive sum of digits of the value obtained by the sum of order of all alphabets in the given string. The order of alphabets is given by the position at which they occur in English Alaphabets. Examples: Input: S = “geek” Output: 1 Explanation: Webpublic int findStringCode(String input1){// Read only region end: String[] words = input1.split(" "); StringBuffer output = new StringBuffer(); for (String word : words) {//int range = word.length() % 2 == 0 ? word.length() / 2 : … how many shot for hepatitis b