In the first example, a is const. In the second, it isn't.
If you don't know what const means, it would be quicker and less effort for you to simply look it up, rather than ask us to re-type information that's already available for you to read.
not exactly no. it's to prevent your code from inadvertently changing your code.
say you define this:
1 2 3 4 5 6
// mathematical pi:
double pi = 3.141;
// some other variable
double piVar = 42.0;
now let's say you come back and write some more code in a year's time and you need to change piVar from 42.0 to 43.0, but you haven't had much sleep and you're a bit hungover from the night before and you mistakenly type:
double pi = 43.0; // oops changed the wrong variable
your compiler will compile this quite happily. which is bad because you've just changed a fundamental constant of nature.
by declaring pi like this:
1 2
// mathematical pi:
constdouble pi = 3.141;
prevents silly mistakes like that, as now your compiler will moan and tell you you're trying to change something you have declared as constant.