is my code ok?
Hello everyone, One of the questions in the exercises from the first lesson of the C++ arrays chapter in Sololearn was the following: **PRACTICE EXERCISE** **Alphabet** The given code declares an array that holds the letters of the English alphabet. **Task** Take a number as input and output the letter from the array that corresponds to that index. To solve this problem, I wrote the following code: ```cpp #include <iostream> using namespace std; int main() { char letters[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; int num; cin >> num; cout << letters[num]; } ``` My code was accepted and it worked correctly! It was surprising to me that my code was accepted and worked as expected! I would appreciate it if you could let me know whether I solved the problem exactly as intended by the question, or if it needed to be solved in a different way. Thank you all!