Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #define LENGHT 15
  4.  
  5. char **test;
  6.  
  7. char pepe[3][LENGHT] = {
  8. "esto es una",
  9. "prueba para",
  10. "ver si func"
  11. };
  12.  
  13. void printArray(char prueba[][LENGHT],int size)
  14. {
  15. int i;
  16.  
  17. for(i = 0; i < size; i++)
  18. {
  19. printf("%s\n", prueba[i]);
  20. }
  21. }
  22. void main (void)
  23. {
  24. printf("Direccionamos test a pepe para comprobar que funciona\n");
  25. printArray(pepe, 3);
  26. test = &pepe[0];
  27. printf("\nAhora imprimimos la de verdad\n");
  28. printArray(test, 3);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement