strcpy source is not displayed

 #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main ()
    char a[]="one string",b[]="twostrings";
     strcpy (a,b);


a and b are equal after displaying them ,but if I put a space like this b[]="two strings", and then cout b ,it shows b as blank,why?

Source: c++

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.