> However, the way pointers work with different data types can be confusing for me
You have to remember that printf/scanf with "%s" coupled with a char* pointer is a special case.
There's no hidden magic when it comes to arrays of any other type.
Operating on a single char, and using the %c format, you can see the similarity.
Code:
char ch = 'a';
char *y = &ch;
printf("%c\n", *y); // Output: a
int num = 10; // Define an integer variable 'num'
int *x = # // 'x' points to the address of the integer variable 'num'
printf("%d\n", *x); // Output: 10