Advertisement
Adm1n_0v3rride

strcpy in C (C) 2017 by Adm1n_0v3rride

Dec 26th, 2017
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. // strcpy in C (C) 2017 by Adm1n_0v3rride
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5. int main() {
  6.    
  7.     char message[20];
  8.     int count,i;
  9.    
  10.     strcpy(message, "Hello, world!");
  11.    
  12.     printf("How many times do you want your message to be looped?: ");
  13.     scanf("%d", &count);
  14.    
  15.     for(i = 0; i < count; i++) {
  16.         printf("%3d - %s\n", i, message);
  17.     }
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement