Do not count last NULL character .
len_str -= 1 ; cout << " Encoded ▁ string ▁ : ▁ " << encoded_string << endl ; cout << " Decoded ▁ string ▁ : ▁ " << base64Decoder ( encoded_string , len_str ) << endl ; return 0 ; }