C++ Program to Determine the Unicode Code Point at a Given Index Last Updated : 07 Oct, 2022 Comments Improve Suggest changes 1 Likes Like Report Here, we will find out the unicode code point at a given index using a C++ program. Input: arr = "geEKs" Output: The Unicode Code Point At 0 is = 71. The Unicode Code Point At 1 is = 101. The Unicode Code Point At 2 is = 69. The Unicode Code Point At 3 is = 107. The Unicode Code Point At 4 is = 83.Approach: If the array/string value is increased then it is not feasible to declare an individual variable for the index. If the string size is decreased then the fixed variables can give Out of Bound Error. To handle these situations we will use a for loop to traverse the given string and print the corresponding code point. Example: C++ // C++ program to demonstrate // Unicode Code point // at a given index #include <iostream> using namespace std; // Driver code int main() { // define input array/string char arr[] = "GeEkS"; int code; // print arr cout << " Input String = " << arr; // execute a loop to traverse the arr elements for (int i = 0; arr[i] != '\0'; i++) { code = arr[i]; // display unicode code point at i-th index cout <<"\n The Unicode Code Point At "<<i<< " is = " << code; } return 0; } Output Input String = GeEkS The Unicode Code Point At 0 is 71 The Unicode Code Point At 1 is 101 The Unicode Code Point At 2 is 69 The Unicode Code Point At 3 is 107 The Unicode Code Point At 4 is 83 Time Complexity: O(n), where n is the array size.Space Complexity: O(1), Comment M mukulsomukesh Follow 1 Improve M mukulsomukesh Follow 1 Improve Article Tags : C++ Programs C++ C Misc Programs Explore C++ BasicsIntroduction to C++3 min readData Types in C++6 min readVariables in C++4 min readOperators in C++9 min readBasic Input / Output in C++3 min readControl flow statements in Programming15+ min readLoops in C++7 min readFunctions in C++8 min readArrays in C++8 min readCore ConceptsPointers and References in C++5 min readnew and delete Operators in C++ For Dynamic Memory5 min readTemplates in C++8 min readStructures, Unions and Enumerations in C++3 min readException Handling in C++12 min readFile Handling in C++8 min readMultithreading in C++8 min readNamespace in C++5 min readOOP in C++Object Oriented Programming in C++8 min readInheritance in C++6 min readPolymorphism in C++5 min readEncapsulation in C++3 min readAbstraction in C++4 min readStandard Template Library(STL)Standard Template Library (STL) in C++3 min readContainers in C++ STL2 min readIterators in C++ STL10 min readC++ STL Algorithm Library3 min readPractice & ProblemsC++ Interview Questions and Answers1 min readC++ Programming Examples4 min read Like