online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include<map> #include<string> #include<vector> int main() { char c[] = { 'A','B','C','D','E' }; std::size_t len = std::size(c); //---------------------v------------->divide by 2 so that we iterate only half the size times for (int i = 0; i < len/2; i++) { std::cout << c[i]<<c[len - i - 1]; } if (len % 2) {//in case we have odd number of elements std::cout << c[len/2]; } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue