Const question

Are the following statements valid? Why?

const int m =200;

const int * q = &m;

++(*q);

++q;
What do you think and why?
No, but i'm not sure why. That's why i am asking
What do you think const means?
const allows you to specify whether or not a variable is modifiable.
actually 'constant' is a key word which tells the compiler that the value ain't gonna change throughout the run of program. and if you try to change it forcefully,"It flashes an error."
Topic archived. No new replies allowed.