A lot of problems:
demo.c:68:5: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[3]’ [-Wformat]
demo.c:81:17: error: ‘jog2_carta2’ undeclared (first use in this function)
demo.c:81:17: note: each undeclared identifier is reported only once for each function it appears in
demo.c:83:17: error: ‘jog2_carta3’ undeclared (first use in this function)
demo.c:87:5: warning: passing argument 1 of ‘retornaMaior’ from incompatible pointer type [enabled by default]
demo.c:26:7: note: expected ‘char *’ but argument is of type ‘char (*)[7]’
And more ...
char *carta = "YY";
carta[0] = cartas_jogo[posMaior]; /* Error: carta is a string literal (read only) */
a++;
carta[1] = cartas[posA]; /* Error: carta is a string literal (read only) */
return carta;
Finally:
printf("%s", retornaMaior(&cartas,mesa_jog1[0]));
should be
printf("%s", retornaMaior(cartas,mesa_jog1[0]));
because cartas
is (decays into) a pointer