Advertisement
dllbridge

Untitled

Feb 6th, 2022
942
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include   <stdio.h>
  2. #include  <iostream>
  3. #include    <string>
  4. #include   <cstring>
  5. using namespace std;
  6.  
  7.  
  8. string    str_1   =       "SONY";
  9.  
  10. char     sz_1[73] = "_Pictures.";
  11.  
  12. ////////////////////////////////////////////////////////////////////
  13. int main()                                                        //
  14. {
  15.  
  16.     str_1 += sz_1;
  17.  
  18.     cout << "1: " << str_1 << endl;
  19.  
  20.     printf("The length of \"str_1\" = %d \n", str_1.length());
  21.  
  22.     strcpy(sz_1, str_1.c_str());
  23.    
  24.     printf( "2: %s \n", sz_1);
  25.  
  26. return 0;
  27. }
  28.  
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement