typdef char * hello; const hello ptr1,ptr2;
So, in this snippet, my question is that what is constant ? is ptr1 constant or the value to which ptr1 will "point to" will be constant ? and will u please give reason also?
my thinking: const hello means (const char * ptr1). means ptr1's value will be constant not ptr1 itself. in case, it is char * const ptr1, then ptr1 will be constant. but answer of above question I asked is that "ptr1 is constant". please make me correct in my approach.
thanks in advance. any help will be thanful.
Edited 4 Years Ago by I_m_rude