FlexTrade Interview Question
Software Engineer / Developersconst char *a; //the value of the char is const, not allowed to change value
*a = 'F'; //illegal: change the const char value
a = "Hi"; // legal
char* const a; //the addr of the char is const, not allowed to change addr
*a = 'F'; //legal
a ="HI"; //illegal, change the addr that's supposed to be const.
const char *p => cannot change the contents to which it is pointing
- ibnipun10 July 28, 2010char *const p => cannot change the pointer address..