homework/cpp/txt.txt

22 lines
357 B
Plaintext
Raw Permalink Normal View History

2024-05-24 12:00:16 +00:00
#include <stdio.h>
#include <string.h>
size_t my_strlen(const char *str) {
size_t len = 0;
while (*str++) {
len++;
}
return len;
}
int main() {
const char *test_string = "Hello, world!";
size_t length = my_strlen(test_string);
char source[] = "Fabian";
char destination[100];
strcpy(destination, source);
return 0;
}