top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Print all the sub arrays of an array with iterative approach using C?

+1 vote
237 views
Print all the sub arrays of an array with iterative approach using C?
posted Feb 28, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

Array consist of -1 and 1, Find count of all sub-arrays where sum = 0.
Input:
[-1,1,-1,1]

Output:
4
[-1,1] [1,-1],[-1,1],[-1,1,-1,1]

–1 vote

Given an ODD number, print diamond pattern of stars recursively.

Example
Input: n = 5,

Output:

  *
 ***
*****
 ***
  *
...