strcpy function not working in visual sudio

  Uncategorised
#include <stdio.h> 
#include <string.h> 
void main()
{
    char copy[25] = { '{$content}' }, copy2[25] = { '{$content}' },
    msg[25] = "The game is amazing";
    strcpy(copy, msg);
    printf("The first copy gave: %sn", copy);
    strncpy(copy2, msg, 11);
    printf("The second copy gave: %sn", copy2);

}

I wanna copy msg to copy but it’s not working, what’s the reason?

Source: Visual Studio Questions

LEAVE A COMMENT