[Solved] Converting binary to octal using strings
To group characters by 3, first count how many there are: int num_of_binary_digits = strlen(binarni); This may not be divisible by 3. For example: Binary string: 00001111 Subdivided into groups of 3: 00|001|111 To count the number of octal digits, divide by 3 with rounding up: int num_of_octal_digits = (num_of_binary_digits + 2) / 3; To … Read more