Answer Posted / srsabariselvan
constant Pointer:
we can't modify the value of pointer.i.e.,value of
pointer is constant.
Declaration:
int i=2,j;
int const *p;
p=&i;
p=&j;
Pointer Constant:
in case of Pointer constant, we can't modify the address of
pointer.i.e,address stored in pointer is constant.
This must be intialized
Declaration:
int i=2;
int *const p=&i;
*p=4;
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Tell me with an example the self-referential structure?
If errno contains a nonzero number, is there an error?
How to set file pointer to beginning c?
Differentiate between declaring a variable and defining a variable?
What is a const pointer?
What is action and transformation in spark?
Which programming language is best for getting job 2020?
Is sizeof a keyword in c?
List some of the dynamic data structures in C?
What are pointers? What are stacks and queues?
Why void is used in c?
What is the purpose of void pointer?
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 the use of #define preprocessor in c?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].