What is the difference between constant pointer and pointer
to a constant. Give examples.
Answer Posted / prashant
the example given by Santosh for "Constant Pointer" is wrong .
Use
int * const p = &localVariable;
instead of const int *p = &localVariable;.
then we cant do p++ or p--;
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Explain what is dynamic data structure?
Difference between MAC vs. IP Addressing
What is the purpose of 'register' keyword in c language?
What is the difference between Printf(..) and sprint(...) ?
What is a const pointer?
What is preprocessor with example?
What is else if ladder?
When c language was developed?
What is c variable?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
Can you mix old-style and new-style function syntax?
What are examples of structures?
What is #line in c?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd