Advertisement
hopingsteam

Untitled

Oct 13th, 2020
1,791
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. using namespace  std;
  5.  
  6. int main() {
  7.     char cuvant[20] = "masina";
  8.     /*
  9.      * 0 - m
  10.      * 1 - a
  11.      * 2 - s
  12.      * 3 - i
  13.      * 4 - n
  14.      * 5 - a
  15.      */
  16.     strcpy(cuvant + 2, cuvant + 3);
  17.     cout << cuvant;
  18.     // strcpy(cuvant + x, cuvant + x + 1); - unde x e pozitia literei
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement