Advertisement
FuncaosCAndCPluplus

StrcpyStrcat_strlen

Aug 16th, 2016
3,121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4.    using namespace std;
  5.    
  6. int main(){
  7.    
  8.     // Copy the second parameter for the first!
  9.     char pointer1[25];
  10.  
  11.     strcpy(pointer1,"");   
  12.    
  13.     int tmLetra = strlen(pointer);
  14.    
  15.     //Concatena the first parameter witch the second!
  16.     char n1 [] = "A" ;
  17.     char n2 [] = "B" ;
  18.    
  19.     char *p = strcat(n1,n2);
  20.    
  21.     for(int i=0;i<1;i++)
  22.     cout<<p+i<<"\n";
  23.  
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement