Question: Please write it in C++ Important requirements for all questions: No global variable is allowed to be declared and used. Constants are ok. Functions cannot
Write a function named "isJustZeroAndOnes" that accepts a C-string (an array of characters terminating by a NULL character). It returns true when the C-string just contains ' 0 's and/or ' 1 's only and false otherwise. In addition, it also returns two additional boolean flags: one flag to indicate the C-string contains only ' 0 's and the other to indicate that it contains only 'I's. In another words, this function will return 3 different boolean flags. For example, these are the C-strings with their expected return values: Write a function named "isJustZeroAndOnes" that accepts a C-string (an array of characters terminating by a NULL character). It returns true when the C-string just contains ' 0 's and/or ' 1 's only and false otherwise. In addition, it also returns two additional boolean flags: one flag to indicate the C-string contains only ' 0 's and the other to indicate that it contains only 'I's. In another words, this function will return 3 different boolean flags. For example, these are the C-strings with their expected return values
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
