I dont understand why I am getting an output like this: StackOver↨< as snprintf should take care of null termination as expected output is StackOver. I am using devcpp IDE.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(void)
{
    char buffer[10];
    printf("%d\n", sizeof(buffer));
    snprintf(buffer, sizeof(buffer), "%s", "StackOverflow");
    printf("%s", buffer);
    return 0;
}
 
     
    