Design a transducer to convert a binary string into octal. For
example the bit string 001101110 should produce 156.
Please complete the code to account for the 7 cases of 3 digit
binary strings.
//Function binaryToOctal takes a char array digits of length
3
//Pre: digits contains 3 binary digits.
//Post: function returns the octal number equivalent to the 3
binary digits
int binaryToOctal( char digits[], int 3){
int number;
if(digits[0]=='0')
if (digits[1]=='1')
if (digits[2]=='0')
return 2;//found "010"
else return...