Code:
char type, letters[4], digits[5];
char l_plates[M][N];
for (i=0; i<M; i++) {
scanf(" %c", &type);
scanf("%3s", letters);
scanf("%4s", digits);
sprintf(l_plates[i][N], "%s %s %c", letters, digits, type);
}
Can someone please explain to me why this isn't compiling and how to fix it?
I'm getting:
warning: passing argument 1 of 'sprintf' makes pointer from integer without a cast [enabled by default]
note: expected 'char * __restrict__ ' but argument is of type 'char'.
PS: I have included <stdio.h> and <string.h>, this is only part of the code.