Solution in Java and C
Code
# Code
```c []
bool isBalanced(char* num) {
    int odd = 0, even = 0, len = strlen(num);
    int i = 0;
    while (i < len) {
        odd += (num[i] - 48);
        i += 2;
    }
    i = 1;
    while (i < len) {
        even += (num[i] - 48);
        i += 2;
    }
    return odd == even;
}
```
```Java []
class Solution {
    public boolean isBalanced(String num) {
        int odd = 0, even = 0, len = num.length();
        int i = 0;
        while (i < len) {
            odd += (num.charAt(i) - 48);
            i += 2;
        }
        i = 1;
        while (i < len) {
            even += (num.charAt(i) - 48);
            i += 2;
        }
        return odd == even;
    }
}
```
['String', 'C', 'Java']