The problem specification is simple: given an integer \( n \geq 0 \), print all binary strings from \( 000\ldots0 \) (of length \( n \)) to \( 111\ldots1 \) (of length \( n \)) in order.
Input:
\( n = 3 \)Output: (printed on screen)
000
001
010
011
100
101
110
111
Functions that generate binary strings are useful in various practical applications involving combinatorial enumeration, such as brute-force searching, subset generation in optimization problems, state-space exploration in AI, generating truth tables for Boolean logic circuits, and determining possible configurations in scheduling or resource allocation problems, among others.
The following code contains two function prototypes (to be implemented by you), and a main that tests them.