when I execute this code below with the text: hello world, the result is 5 characters. Why is that?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char *n = malloc(sizeof(char) * 50);
printf("Text: ");
scanf("%s", n);
int characters = strlen(n);
printf("%s\n", n);
printf("%i\n", characters);
}