what is the difference between
const char *p, char const *p, const char* const p
Answer Posted / vignesh1988i
CONST char *p:
here the const. keyword is coming before the data
type... so the string here will be the constant but not he
pointer...
char CONST *p:
here also the string will be the constant but not the
pointer...
CONST char* CONST p:
here both , the string as well the pointer will be constant
| Is This Answer Correct ? | 64 Yes | 32 No |
Post New Answer View All Answers
Why pointers are used?
What are different storage class specifiers in c?
What is meant by initialization and how we initialize a variable?
How can I write a function analogous to scanf?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
Why is c called "mother" language?
Do pointers store the address of value or the actual value of a variable?
What are the complete rules for header file searching?
When should you use a type cast?
Explain what is the stack?
What are pointers in C? Give an example where to illustrate their significance.
Why is structure important for a child?
Explain what is operator promotion?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
Differentiate between functions getch() and getche().