in C language how would I do in just one printf to receive two variables for example: type your age and name and already receive the variable name and variable age, would that be it?
#include <stdio.h>
#include <stdlib.h>
main(void){
char age, name;
printf("Type your age and name: ");
scanf("%s", &age, "%s", &name);
return 0;
}
I tried to put both variables inside the same scanf:
printf("Type your age and name: ");
scanf("%s", &age, "%s", &name);
I also tried to put it like this:
printf("Type your age and name: ");
scanf("%s", &age, &name);
I tried to put two scanf and only one printf:
printf("Type your age and name: ");
scanf("%s", &age);
scanf("%s", &name);