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
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
Why does everyone say not to use gets?
Difference between Function to pointer and pointer to function
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
Explain the meaning of keyword 'extern' in a function declaration.
How do I convert a string to all upper or lower case?
Why is it important to memset a variable, immediately after allocating memory to it ?
What is FIFO?
What does the && operator do in a program code?
Is main a keyword in c?
Why is event driven programming or procedural programming, better within specific scenario?
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.
Write a program to generate the Fibinocci Series
Is fortran still used in 2018?
How to create struct variables?