online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include<time.h> #include<stdlib.h> using namespace std; int main() { string arr[] = {"hey","music","ola","dang"}; int size = sizeof(arr) / sizeof(arr[0]); int random; srand(time(0)); for (int i = 0; i < size; i++)//note the indexing starts from 0 { random = rand() % ((size)); //changed this cout << random << "\t" << arr[random] << endl; } cout << endl; }

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