#include <stdio.h>
#include <cs50.h>
#include <ctype.h>
#include <string.h>
int main()
{
string Name[2];
{
printf("Enter your name: \n");
scanf("%s%s", &Name[0], &Name[1]);
}
int i = strlen(Name[0]);
int j = strlen(Name[1]);
printf("%c%c\n", toupper(Name[i][0]), toupper(Name[j][0]));
}
this is my code to print the initials of user's name in capital letters, but the compiler keeps outputting this error.
~/workspace/pset2/ $ make initials
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow initials.c -lcs50 -lm -o initials
initials.c:12:23: error: format specifies type 'char *' but the argument has type 'string *' (aka 'char **') [-Werror,-Wformat]
scanf("%s%s", &Name[0], &Name[1]);
~~ ^~~~~~~~
initials.c:12:33: error: format specifies type 'char *' but the argument has type 'string *' (aka 'char **') [-Werror,-Wformat]
scanf("%s%s", &Name[0], &Name[1]);
~~ ^~~~~~~~
2 errors generated.
make: *** [initials] Error 1