hopingsteam

Untitled

Oct 13th, 2020
685
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data