Hi. I came across this piece of code below and was thinking, isn't there a better way of declaring a char for a single character? I also saw the same thing done here
Code:char letter = ' '; printf("enter letter\n"); scanf("%c",&letter); printf("print letter %c\n",letter);
I tried, char letter[0], but it didn't work. I thought it would declare an array of char with 1 element.
If I entered, char letter; would that be a char of 1 ?
Thanks