Sección 3. Capítulo 6
single
Challenge: Concatenating Strings
Desliza para mostrar el menú
Tarea
Swipe to start coding
Practice concatenating strings safely in C by implementing a function that appends the contents of one string to another, making sure not to exceed the destination buffer's size and always ensuring the result is null-terminated.
- Append the contents of
srcto the end ofdestwithout exceedingdest_size - 1characters indest. - Ensure the resulting string in
destis always null-terminated. - Only append as many characters from
srcas will fit in the remaining space ofdest. - Do not modify characters in
destbeyond the allowed buffer size.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 6
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla