What is a const pointer, and how does it differ from a pointer to a const?
Answers were Sorted based on User's Feedback
Answer / nashiinformaticssolutions
1. Pointer to const: The value being pointed to cannot be modified, but the pointer itself can change.
Example:
2. const int a = 10;
3. const int *ptr = &a; // *ptr is read-only
4. const pointer: The pointer cannot change, but the value it points to can.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / glibwaresoftsolutions
1. Pointer to const: The value being pointed to cannot be modified, but the pointer itself can change.
Example:
2. const int a = 10;
3. const int *ptr = &a; // *ptr is read-only
4. const pointer: The pointer cannot change, but the value it points to can.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are pointers in C? Give an example where to illustrate their significance.
What is #include in c?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
how to write a bubble sort program without using temporary variable?
write a program to compare 2 numbers without using logical operators?
hello everybody can we change a the adress of a variabl i mean can i put for exemple for a int *p: &p=6 ?????????
do u print this format '(((())))'. This brackets is based on user input like 4 or 5 or 6,without using any loop's?
What is data structure in c language?
Software Interview Questions
can we print any string without using terminator?
control 50 devices which has 2 states on and off.using bitwise operator.plz answer it its urgent
What is stack in c?