online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Printing Total no of subsets and subsets of given set *******************************************************************************/ #include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<math.h> int arr[100][100]; int m,f; int main() { int i,j; printf("enter size of array:"); scanf("%d",&m); f=pow(2,m);//Total no of subsets for(i=0;i<f;i++) bin(i); int a[m]; printf("enter the elements:"); for(i=0;i<m;i++) scanf("%d",&a[i]); printf("Total no of subsets are:%d \n",f); printf("Total subsets are:\n"); subsets(a); } void bin(unsigned n)//storing of binary numners into 2-D array { int k=0; static int j=0; unsigned i; for(i=1<<(m-1);i>0;i=i/2) { if(n & i) arr[j][k]=1; else arr[j][k]=0; k++; } j++; } void subsets( int a[])//subset printing { int i,j; for(i=0;i<f;i++) { for(j=0;j<m;j++) { if(arr[i][j]==1) { printf("%d",a[j]); } } printf("\n"); } }

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