Find the required periodic string with period 2
else { char arr [ l ] ; for ( int i = 0 ; i < l ; i += 2 ) { arr [ i ] = '1' ; arr [ i + 1 ] = '0' ; } for ( int i = 0 ; i < l ; i ++ ) cout << arr [ i ] ; cout << " STRNEWLINE " ; } }