text: divide the whole string by 2. i is used to track index in current number . j is used to track index for next iteration .
code: int j = 0 ; for ( int i = 0 ; i < len_str ; i ++ ) { num = num * 10 + ( int ) str [ i ] - ( int ) '0' ;