frostblooded

Print strings

Nov 15th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main() {
  5.     char first_string[32];
  6.     char second_string[32];
  7.     scanf("%s", first_string);
  8.     scanf("%s", second_string);
  9.  
  10.     int i;
  11.     for(i = 0; first_string[i] != '\0'; i++) {
  12.         printf("%c", first_string[i]);
  13.     }
  14.     for(i = 0; second_string[i] != '\0'; i++) {
  15.         printf("%c", second_string[i]);
  16.     }
  17.  
  18.     printf("\n");
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment