This program is compiling just fine but is not running. Even, Main is not initializing,

Here is my code

Thanks for your help.Code:#include <stdio.h> #include <stdlib.h> #include <string.h> int pow2(int n) { printf("POW2"); int pow = 1; while(n <= pow) { if (n < pow) { return 0; } else if(n == pow) { return 1; } else pow = pow * 2; } return 0; } int average(int c[], int len) { printf("average"); int *firstHalf = c; int *secondHalf = c + (len/2); /*if((len%2) != 0) { int *firstHalf = c; int *secondHalf = c + (len/2); return (average(firstHalf, (len/2)) + average(secondHalf,(len/2)))/2); }*/ return (average(firstHalf, (len/2))+average(secondHalf,(len/2))/2); } /* ********************************************************* MAIN */ int main(int argc, char **argv) { printf ("MAIN"); int c[100]; int size; int i; int sum; float avg; i = 0; size = 0; sum = 0; avg = 0; /* LER OPERAÇÃO */ printf ("antes while"); char currentOp[1]; printf ("antes while"); while(strcmp(argv[i],"\0") != 0) {printf ("durante while"); i++; strcpy(currentOp,argv[i]); if(currentOp[0] == 'a') { /* ADD */ i++; c[size] = atoi(argv[i]); size++; sum += c[size]; if(pow2(sum) == 1) { avg = average(c,size); printf("%.3f\n", avg); } } else if(currentOp[0] == 'r') { /* REMOVE */ int j; int y; j = 0; y = 0; i++; int current = atoi(argv[i]); for (j=0; j<size; j++) { if (c[j] == current) { for(y=j; y<size; y++) { c[y] = c[y+1]; } sum = sum - current; size--; } } if(pow2(sum) == 1) { avg = average(c,size); printf("%.3f\n", avg); } } else { /* REPLACE */ int old; int new; int k; k = 0; i++; old = atoi(argv[i]); i++; new = atoi(argv[i]); if (new != old) { for (k=0; k<size; k++) { if(c[k] == old) { c[k] = new; sum = sum - old + new; } } } if (pow2(sum) == 1) { avg = average(c,size); printf("%.3f\n", avg); } } } return 0; }