Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main (void){
  6.   char *stringhe[10];
  7.   int x = 5;
  8.   int i = 0;
  9.   for(; i < x; i++){
  10.     stringhe[i] = (char *) malloc(x * sizeof(char));
  11.     scanf("%s",stringhe[i]);
  12. }
  13.   for(i=0; i < x; i++) printf("%s-\n", stringhe[i]);
  14.   return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement