Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
using namespace std; int main() { char str1[] = "Hello World!"; char str2[] = "Write code!"; strncpy(str2, str1, 6); cout << str1 << "\n"; cout << str2 << "\n"; return 0; }
Hello World!
Hello code!