pabloliva87

Ej13Chapter20C++

Aug 19th, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. int main(void)
  5. {
  6.     char s1[] = "HolaEdmundoComoEstamos";
  7.  
  8.     char* ePos = strchr(s1, 'E');
  9.  
  10.     char* elPos = strrchr(s1, 'E');
  11.  
  12.     strcpy(ePos, elPos);
  13.  
  14.     std::cout << s1 << std::endl;
  15.  
  16.     return EXIT_SUCCESS;
  17. }
Add Comment
Please, Sign In to add comment