warning:
format %s expects type char * , but argument 2 has type char **
from this piece of code:
Code:
#include <stdio.h>
main()
{
char *colors[3][10] = {'\0'};
printf("\nEnter 3 colors seperated by spaces: ");
scanf("%s %s %s", colors[0], colors[1], colors[2]);
printf("\nYour entered: ");
printf("%s %s %s\n", colors[0], colors[1], colors[2]);
}
AND
warning: format '%s' expects type 'char *', but argument 2 has type 'char (*)[3]'
from this piece of code:
Code:
#include <stdio.h>
int main( void ) {
char tab[2][3] = {'1', '2', '\0', '3', '4', '\0'};
printf("%s\n", tab);
return 0;
}
Thanks!