I am getting the following error message after compiling the below code: "scanf_s: format type %c requires an argument of type 'unsigned int', but variadic argument 2 has type char."
In all the documentation I have seen %c donates data type char so I don't understand why the below is not working?
#include <stdio.h>
int main(void)
{
char first, middle, last; /*char data type can hold 1 text value*/
int age;
printf("Input your three initials and your age:");
scanf_s("%c%c%c%d", &first, &middle, &last, &age); /*data types to expect from user input, variables to assign user input to*/
printf("\nGreetings %c.%c.%c %s %d.\n", first, middle, last, "Next year you will be", age + 1);
return 0;
}