Menu

(Solved) : Given String C Bcdag Number K Write Function C Breaks String Strings Posible Combinations Q26925114 . . .

Given a string in C++ such as ” BCDAG” and a number k . Write afunction in C++ that breaks this string up into strings of allposible combinations of size k and print it out with a spacebetween them. Note the output must not be characters butsrings.

Eg If k=2, the strings produced should be “BC” “CD” “DA” and”AG” .

NOTE:Only use For loops/conditional statements to solve thisproblem.

Expert Answer


Answer to Given String C Bcdag Number K Write Function C Breaks String Strings Posible Combinations Q26925114 . . .

OR