On 1, the const keyword prevents the data being pointed to by foo to be modified.Code:void a_function(char const *foo); /* 1 */ void another_function(const char *bar); /* 2 */
On 2, the const keyword prevents bar from pointing to somewhere else.
Am I correct on this? Thanks