what is the difference between char * const and const char
*?
Answer Posted / brindha
Char* const p -> Here pointer P is a const pointer, which
means that this pointer can point to only one memory
location. eg. char* const p = &arr;
p++ ; -> This is invalid
const char* p -> this indicates that the data pointed by
the pointer p is constant & the value in that address
cannot be modified. eg. const char* p = 'a';
*p = 'b'; -> This is invalid
| Is This Answer Correct ? | 30 Yes | 2 No |
Post New Answer View All Answers
can anyone please tell about the nested interrupts?
What does c mean before a date?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
What is an array? What the different types of arrays in c?
What is static volatile in c?
Why is c called a structured programming language?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
Why is structure important for a child?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
What are shell structures used for?
What is main function in c?
Explain enumerated types.
Which is better pointer or array?
What is the scope of an external variable in c?
How can I invoke another program or command and trap its output?