擅长:python、mysql、java
<pre><code>int possibleways(int input1_size,int *input1)
{
unsigned int pow_set_size = pow(2, input1_size);
int counter, j;
for(counter = 0; counter < pow_set_size; counter++)
{
for(j = 0; j < set_size; j++)
{
/* Check if jth bit in the counter is set
If set then pront jth element from set */
if(counter & (1<<j))
printf("%d", input1[j]);
}
printf("\n");
}
}
// I wrote this code it showed the output still , I got 0 in exam competition.
</code></pre>