New answers tagged

1

The wrong thig with option 3 is the buffer length, you should use snprintf instead. The other problem is that first you build the string, then you print the output, the program traverses the string twice. Option 2 creates object from string, then applies + operator to create a new string, then prints it - it is comfortable with short strings, but least ...


Top 50 recent answers are included