my program is skipping one symbol scanf, but the rest are not skipped

Viewed 37

When I try to run the code. The output in the terminal tries to skip the symbol. I don't know why?

#include <stdio.h>
#include <string.h>

int main() {
    int rows;
    int columns;
    char symbol;
    printf("\nEnter # of rows: ");
    scanf("%d", &rows);
    printf("Enter # of columns: ");
    scanf("%d", &columns); 
    printf("Enter a symbol to use: ");
    scanf("%c", &symbol);

    for(int i = 1; i <= rows; i++)
    {
        for(int j = 1; j <= columns; j++)
        {
            printf("%s",  &symbol);
        }
        printf("\n");
    }

    return 0;
}

The terminal output:

Enter # of rows: 2
Enter # of columns: 3
Enter a symbol to use:
0 Answers
Related