what is the difference between
const char *p, char const *p, const char* const p
Answer Posted / magdaleen
In a const char *p the chrac pointed by 'p' is a const, so
u cant change the value of the charac ponted by 'p', but u
can make 'p' refer to some other location.
In a char const *p, the ptr 'p' is constant not the
character refered by it, so u can not make 'p' refer to
anyother location, but u can change the value of the charac
pointed by 'p'
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
Define and explain about ! Operator?
What is class and object in c?
What is a newline escape sequence?
What is c method?
What is stack in c?
How can I invoke another program or command and trap its output?
Define Spanning-Tree Protocol (STP)
What does the characters “r” and “w” mean when writing programs that will make use of files?
Explain setjmp()?
What is derived datatype in c?
How can you find out how much memory is available?
What is #ifdef ? What is its application?
What is the general form of a C program?
What is the difference between c and python?
What is malloc() function?