online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include <string.h> #include<stdlib.h> int arr[50] = { 1, 5, 10, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0 }; int *num = arr; int a = 0; int n = 0; int func () { while (num < arr + sizeof (arr) / 4) { if (num[0] > 0) { n++; num++; } else if (num[0] == 0) { num++; a++; while (num < arr + (sizeof (arr) / 4)) { if (num[0] > 0) { //printf("Hello"); ++a; n = a + n; num++; //printf("CHISLO%d\n", a); } else { a++; num++; } } } } return n; } int main () { printf ("%d\n", func ()); return 0; }

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