Problem Statement
Write a program that finds the index of the first occurrence of a specific character in a string. Print -1 if the character is not found.
DEMO-C-32 โข Programming in C
Write a program that finds the index of the first occurrence of a specific character in a string. Print -1 if the character is not found.
Input:
C S
Output:
Index
Submit runs every public testcase in this browser. Results and code never leave this device.
z uber
-1
t packet
5
t date
2
i quince
2
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question