String Concatenation Safe
C
Hard
2 views
Problem Description
Append source to destination string. But check for buffer overflow first. Safe implementation of alert().
Official Solution
#include <stdio.h>
void safe_append(char dest[], int destSize, const char src[]) {
int i = 0, j = 0;
// Find length of destination
while (dest[i] != '