Finding possible subset combination from the user input
Avoid repetition
Whenever you are repeating yourself twice or more often, you should immediately find some way to get rid of the repetition. You probably already know how to do this. For example, in this case, just add more for-loops: one to calculate the sum, and another to print all the elements once you have found a set of consecutive elements that sums up to the desired value:
for (int i = 0; i &lt; inpth; i++) {
    int sum = 0;

    for (int j = i; j &lt; inpth &amp;&amp; sum &lt; ism; j++) {
        sum += inarr[j];

        if (sum == ism) {
            // Now I know that the sum of element i to j equals ism
            for (int k = i; k &lt;= j; k++) {
                 printf(&quot;%d &quot;, inarr[k]);
            }

            printf(&quot;\n&quot;);
        }
    }
}

Create functions to solve smaller problems
Try to split up your problem in smaller problems, and write functions to solve the smaller problems. This allows you to focus on the smaller problems, and the code usually becomes more readable as well. For example:
/* Print out a single subset */
static void print_subset(int subarr[], int len) {
    for (int i = 0; i &lt; len; i++) {
        printf(&quot;%d &quot;, subarr[i]);
    }

    printf(&quot;\n&quot;);
}

/* Check if summing from the start of the subarray will get us the desired value */
static void check_subset(int ism, int subarr[], int len) {
    int sum = 0;

    for (int i = 0; i &lt; len &amp;&amp; sum &lt; ism; i++) {
        sum += subarr[i];

        if (sum == ism) {
            print_subset(subarr, i + 1);
        }
    }
}

/* Check all possible subsets of the input array */
int combiset(int ism, int inarr[], int inpth) {
    for (int i = 0; i &lt; inpth; i++) {
        check_subset(ism, inarr + i, inpth - i);
    }
}

In the above, each function only has a single for-loop, which makes them much easier to reason about than the three nested for-loops in the first example I gave.