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
What is wild pointer in c with example?
What are derived data types in c?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
What is hashing in c?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
Explain built-in function?
Where are c variables stored in memory?
praagnovation
What is extern keyword in c?
What is the scope of static variable in c?
What is the use of function overloading in C?
When should you not use a type cast?
Why should I use standard library functions instead of writing my own?
How can you access memory located at a certain address?