I'm a bit unclear as to exactly what your source code was but my guess is this is what you mean. If it's not, let me know:
#include <stdio.h>
Code:
int main(){
char grade[2];
printf("Input a grade: ");
scanf("%s", grade);
printf("\nThe grade you entered was: %s\n", grade);
return 0;
}
You are correct in that it will store the 'B' and the '+' character in a row, but your string will not be null terminated.
It is a good practice to declare character arrays of size (DESIRED_SIZE + 1) and to ensure that last extra index is filled with a null character. Some very useful string functions in <string.h> assume your strings are null-terminated. The null character (aka null terminator) is written '\0'.
Getting into this habit, if you're planning on doing long term C programming, is a good idea. Also, there are some issues with using scanf() to read in strings.
scanf for strings?
Also, to answer your last question: you'll often hear that C is stupid in that it doesn't make many assumptions for you, even if they seem intuitive to you. You want to use a null terminator, you need tell C about the extra index. Many functions already written, or that you may desire to write, cycle through a string until they reach the end. C only knows about 'the end' due to these null terminators. In C if you declare an array (technically a pointer to the first element. Using [] and indexing through the array) you can make assignments like
Code:
char string[2];
string[2] = '\0'; /* because we start indices at 0, we've overstepped our array.
C will not stop you from doing this. The issue is that you may write over something critical, and you'll likely get a segmentation fault. It may seem perfectly intuitive that you can just add the '\0' in memory right after your array, but it doesn't work out. C also doesn't just take care of it for you, so you have to keep an eye on these things.
So to summarize, yes you want to declare the extra space, and get into the habit of null-terminating your strings.