Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4.  
  5. typedef struct String
  6. {
  7.     char nome[10];
  8. } string;
  9.  
  10. int main()
  11. {
  12.     char nome[5][15];
  13.     string name[5];
  14.     int i;
  15.  
  16.     for (i = 0; i < 5; i++)
  17.     {
  18.         strcpy(name[i].nome, "Mariana");
  19.         strcpy(nome[i], "Nunes");
  20.     }
  21.  
  22.     for (i = 0; i < 5; i++)
  23.     {
  24.         printf("%s\n", name[i].nome);
  25.         printf("%s\n", nome[i]);
  26.     }
  27.  
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement