/**************************************************** * Section : 15 * Machine No. : N * Roll No. : 18CS100XY * Name : Soumyajit Dey, Aritra Hazra * Assignment No : 5c * Description : Determines All Subsets of {1,2,...,n} *****************************************************/ #include #define MAX 100000 void printSubsets(int a[], int n, int i) { int j,k; if (i > 0) { printf("{ "); for (j=0,k=i; j= 0): "); scanf("%d", &n); /* displays all the subsets */ if(n<=0) { printf("NULL Set!\n"); return; } /* populating elements {1,2,...,n} into array and determining number of subsets = 2^n */ for(i=0; i