fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. string a;
  4. int main()
  5. {
  6. string s;
  7. cin >> s;
  8. s += '\0';
  9.  
  10. for (int i = 0; i < s.size()+1; i++)
  11. cout <<"inex " <<i<<" => "<< s[i] << "|\n";
  12. }
Success #stdin #stdout 0s 16064KB
stdin
ABC
stdout
inex 0 => A|
inex 1 => B|
inex 2 => C|
inex 3 => |
inex 4 => |