0

menu using functions

So i made a menu driven program that performs various array operations. And some of the operations (for example sorting) can not be done if user havent made an array using other function. So what to do if user first chooses for example array sorting before creating an array, how do i redirect user to first create an array?

27th Nov 2019, 3:14 PM
A S
A S - avatar
1 Answer
+ 2
Take boolean variable; Set it true after creating array. Then Check its value, If it is true, then call 'sort' function otherwise call 'create array' function....
27th Nov 2019, 4:00 PM
Jayakrishna 🇼🇳