#include <stdio.h>
void MostraTodos(char memoria[][30]) {
for (int i
= 0; i
< 3; i
++) printf("%s\n", memoria
[i
]); }
int main() {
char memoria[3][30];
for (int i = 0; i < 3; i++) {
printf("Introduza o seu nome\n"); scanf("%s", &memoria
[i
][0]); }
MostraTodos(memoria);
}
//https://pt.stackoverflow.com/q/260041/101
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIE1vc3RyYVRvZG9zKGNoYXIgbWVtb3JpYVtdWzMwXSkgewogICAgZm9yIChpbnQgaSA9IDA7IGkgPCAzOyBpKyspIHByaW50ZigiJXNcbiIsIG1lbW9yaWFbaV0pOwp9CgppbnQgbWFpbigpIHsKICAgIGNoYXIgbWVtb3JpYVszXVszMF07CiAgICBmb3IgKGludCBpID0gMDsgaSA8IDM7IGkrKykgewogICAgICAgIHByaW50ZigiSW50cm9kdXphIG8gc2V1IG5vbWVcbiIpOwogICAgICAgIHNjYW5mKCIlcyIsICZtZW1vcmlhW2ldWzBdKTsKICAgIH0KICAgIE1vc3RyYVRvZG9zKG1lbW9yaWEpOwp9CgovL2h0dHBzOi8vcHQuc3RhY2tvdmVyZmxvdy5jb20vcS8yNjAwNDEvMTAx