wats the diference btwen constant pointer and pointer to a
constant.pls give examples.
Answer Posted / rani
Constant pointer cannot be reassigned to different objects
once its initialized. It can be used to modify the object
that it points to.
Eg.
int *const constPtr;
*constPtr =0; //can be modified like this
Pointer to constant can be reassigned to point to another
object of same type.
int const *ptrConst;
ptrConst = 0;
| Is This Answer Correct ? | 37 Yes | 3 No |
Post New Answer View All Answers
what are the 10 different models of writing an addition program in C language?
How can you pass an array to a function by value?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
What would be an example of a structure analogous to structure c?
code for replace tabs with equivalent number of blanks
Suggesting that there can be 62 seconds in a minute?
Explain logical errors? Compare with syntax errors.
How will you divide two numbers in a MACRO?
What does c value mean?
write a program to find out prime number using sieve case?
What is a static function in c?
Explain how are portions of a program disabled in demo versions?
What is string constants?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
What is the mean of function?