Deloitte NLA Placement Questions | 8th Feb Slot | Arrays and Strings | Recent Online Assessment 2026 | First Occurrence Index | Matrix Modification

Question · Posted Mar 2026

Question 1: First Occurrence of a Character (Code Nugget 2) Problem Statement: Write a program to find the index of the first occurrence of a specific character ch in the given string Str. Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to the standard output, and test cases will fail. Constraints: The input must be a string and have lowercase alphabets only. 1 <= {length ...

The full answer & interview discussion are available to premium members.

Log in Create a free account