online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
// 1a.cpp #include <iostream> #include <cstdio> using namespace std; void cargar(int n, int * array1, int * array2); int main() { int n=8, array1[8] = {15, 25, 35, 45, 55, 65, 75, 85}, array2[8], i; cout<<"array1: "; for(int j=0; j<n; ++j) cout<<array1[j]<<" "; cargar(n, array1, array2); cout<<endl; cout<<"array2: "; for(int j=0; j<n; ++j) cout<<array2[j]<<" "<<endl; } void cargar(int n, int * array1, int * array2){ int *i = array1, *j = array1+n-1, n2; n2 = n/2; for(int k=0; k<n2; ++k) { *array2++ = *i++; *array2++ = *j--; } if(n%2) *array2++ = *i++; }

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